get cel of a volume region zone

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Yvan Fournier
Posts: 4209
Joined: Mon Feb 20, 2012 3:25 pm

Re: get cel of a volume region zone

Post by Yvan Fournier »

Hello,

I'm not sure what causes this. Could you post (or send me) the whole case setup ?

Best regards,

Yvan
daniele
Posts: 158
Joined: Wed Feb 01, 2017 11:42 am

Re: get cel of a volume region zone

Post by daniele »

Hello,

I am having problems in using getcel('...',nlelt,lstelt) in a parallel computation.
I use the getcel to select cells where a head loss is imposed. It works fine in serial, but when I switch to parallel for exactly the same simulation the head loss calculated is zero.

From a previous post by Yvan Fournier in this subject, I guess that a special treatment of the getcel must be adopted for parallel computations. Could you please provide me with more details?

Thanks a lot in advance.

Best regards,

daniele
Yvan Fournier
Posts: 4209
Joined: Mon Feb 20, 2012 3:25 pm

Re: get cel of a volume region zone

Post by Yvan Fournier »

Hello,

No, getcell can be used normally in parallel. The list of selected cells will be different on different processes, and may be empty on some, but this is OK. If you "print" this selection in the listing, you will only see the part relative to rank 0, but selections on other ranks still work fine.

Regards,

Yvan
daniele
Posts: 158
Joined: Wed Feb 01, 2017 11:42 am

Re: get cel of a volume region zone

Post by daniele »

Hello,

Thank you for the reply.
I am running on a cluster through a qsub. Do I have to do something different to compile the subroutines compared to a serial computation performed locally?
How can I print on the listing as I do on the GUI interface?

Thanks a lot.

Best regards,

Daniele
Yvan Fournier
Posts: 4209
Joined: Mon Feb 20, 2012 3:25 pm

Re: get cel of a volume region zone

Post by Yvan Fournier »

Hello,

I was thinking of the printing you did in user subroutines for checking. If you use getcel from the GUI, you should not need to do anything specific.

You may want to create a volume postprocessing sub-mesh using the same getcel selection criteria (from the GUI) to visually check the selected region. This is better than printing, as the parallel aspects are "transparent."

Best regards,

Yvan
daniele
Posts: 158
Joined: Wed Feb 01, 2017 11:42 am

Re: get cel of a volume region zone

Post by daniele »

Dear Yvan,

Thanks for your help.
Actually I do use the cs_user_head_losses.f90. When I said "print on the GUI interface" it means that when I perform a calculation in serial on my local machine, I see the prints of the subroutines on the calculation box in the GUI. When I launch a calculation on the cluster, this is not possible. I was wondering if there is a way to print a text document during a cluster calculation analogous to the calculation window in the GUI.

Thanks in advance.

Best regards,

Daniele
Yvan Fournier
Posts: 4209
Joined: Mon Feb 20, 2012 3:25 pm

Re: get cel of a volume region zone

Post by Yvan Fournier »

Hello,

On a cluster, what you print may appear directly in the batch output file (whose name depends on you batch system and options, but usually appears in the directory where the job was submitted).

To have messages from all ranks, you should print to the "nfecra" unit (or use bft_printf rather thant printf in C) and activate listings on all ranks (in advanced job launch setttings) to have outputs in all listings. which is why I prefer to generate a postprocessing sub-mesh matching the selection to check zone selections.

Regards,

Yvan
HelmutZhang
Posts: 15
Joined: Wed Oct 25, 2017 1:51 am

Re: get cel of a volume region zone

Post by HelmutZhang »

Yvan Fournier wrote:Hello,

The option depends on which tool generated the CGNS file (CGNS is supposed to be a standard, but it's a messy one).

If you used ICEM, you need to select the "groups by section" option in the option cell groups column whic appears in the GUI in the selected meshes table.
If not using the GUI, the syntax is described in the mes options in cs_user_scripts.py.

Best regards,

Yvan
hello Yvan,

i want to know where is "groups by section" option in ICEM or what's means by '' select the 'groups by section' option''.

Best regards,
Helmut
Yvan Fournier
Posts: 4209
Joined: Mon Feb 20, 2012 3:25 pm

Re: get cel of a volume region zone

Post by Yvan Fournier »

Hello,

In the GUI, this option appears in a specific column in the array of selected meshes whenever at least one file is a CGNS file.

Best regards,

Yvan
Post Reply