Hello,
Actually when I place the print inside the if(iappel.eq.3) loop nothing is written during the calculation, it seems that the code does not enter this loop.
Anyway, a print of the 'nlelt' variable just after the getcel('zone_name', nlelt, lstelt) gives nlelt=0.
Actually no cells are selected, which is the problem.
I also tried to replace the 'zone_name' by a geometrical condition such as 'z<1.0', but it still selects zero cells.
The problem must be in the way I write the getcel, because I have the same problem when I use the getcel in other subroutines. For example, in the cs_user_source_terms.f90., if I eliminate the getcel I have the source term correctly applied in the entire domain.
Thanks in advance.
Best regards,
Daniele
get cel of a volume region zone
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: get cel of a volume region zone
Hello,
Are you running in parallel or in serial mode ? I forgot to remind you that getcel is local, so the number of selected cells my differ on different ranks. So I recommend testing on a single process first if this is not already the case.
Also, you can compare your selection criteria (if using group names) with the list of cell groups which is listing before the time loop in the listing.
What format mesh are you using ? If using CGNS, you may need an extra option to transfer cell groups.
Regards,
Yvan
Are you running in parallel or in serial mode ? I forgot to remind you that getcel is local, so the number of selected cells my differ on different ranks. So I recommend testing on a single process first if this is not already the case.
Also, you can compare your selection criteria (if using group names) with the list of cell groups which is listing before the time loop in the listing.
What format mesh are you using ? If using CGNS, you may need an extra option to transfer cell groups.
Regards,
Yvan
Re: get cel of a volume region zone
Dear Yvan,
After chiecking in the listing as you suggested, here is the problem:
Code_Saturne: cs_selector.c:193: Warning
The group "TOP" in the selection criteria:
"TOP"
does not correspond to any cell.
Yes, the mesh format is CGNS. What is the extra operation I need to have the cell groups recognized?
Thanks a lot in advance.
Best regards,
Daniele
After chiecking in the listing as you suggested, here is the problem:
Code_Saturne: cs_selector.c:193: Warning
The group "TOP" in the selection criteria:
"TOP"
does not correspond to any cell.
Yes, the mesh format is CGNS. What is the extra operation I need to have the cell groups recognized?
Thanks a lot in advance.
Best regards,
Daniele
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: get cel of a volume region zone
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
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
Re: get cel of a volume region zone
Dear Yvan,
I can select the desired domain where to apply the head loss, but I don't know why but the cs_user_head_losses.f90 still has no impact on the (converged) results. Pressure field remains nthe semain for different values of ckupdc().
I use the same formulation provided in the example...
The iappel nr 1,2 and 3 are correctly read, but the ckupdc(ielpdc, i) value seems to be evaluated as zero by the code... Please note that I have also tried to replace the ckupdc(ielpdc, i) by the ckupdc(iel, i) formulation in the iappel 3.
The subroutine is attached.
Do you have any idea on what I am missing?
Thanks a lot in advance.
Best regards,
Daniele
I can select the desired domain where to apply the head loss, but I don't know why but the cs_user_head_losses.f90 still has no impact on the (converged) results. Pressure field remains nthe semain for different values of ckupdc().
I use the same formulation provided in the example...
The iappel nr 1,2 and 3 are correctly read, but the ckupdc(ielpdc, i) value seems to be evaluated as zero by the code... Please note that I have also tried to replace the ckupdc(ielpdc, i) by the ckupdc(iel, i) formulation in the iappel 3.
The subroutine is attached.
Do you have any idea on what I am missing?
Thanks a lot in advance.
Best regards,
Daniele
- Attachments
-
- cs_user_head_losses.f90
- (7.87 KiB) Downloaded 325 times
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: get cel of a volume region zone
Hello,
Did you also print values in the loop for a small mesh (or samples on a big mesh ?) is your "vit" vlaue computed correctly ? Could you also print" ncepdp" in iappel 3 to make sure it was not overwritten ?
How many time steps are you running ?
Regards,
Yvan
Did you also print values in the loop for a small mesh (or samples on a big mesh ?) is your "vit" vlaue computed correctly ? Could you also print" ncepdp" in iappel 3 to make sure it was not overwritten ?
How many time steps are you running ?
Regards,
Yvan
Re: get cel of a volume region zone
Hello Yvan,
I tried to print everything: the values of « vit » and « ckupdc() » are well calculated inside the loop.
I am running the simulation in a steady state frame until convergence (residuals 10-4).
Something weird happens when using the cs_user_head_losses.f90. Actually when I add the head_losses.f90 subroutine, convergence takes much more iterations to be achieved, compared to the case without the subroutine. But, the strange thing is that the final converged solution features exactly the same pressure field, even if a use a huge value of ckupdc as:
ckupdc(ielpdc,3) = 100000.d0*vit
One more thing I noted is that if I use ‘all[]’ instead of ‘zone_name’ inside the getcel, the calculation blocks (with no printed error) after the first iteration, and one has to kill it in order to stop it.
Thanks in advance.
Best regards,
Daniele
I tried to print everything: the values of « vit » and « ckupdc() » are well calculated inside the loop.
I am running the simulation in a steady state frame until convergence (residuals 10-4).
Something weird happens when using the cs_user_head_losses.f90. Actually when I add the head_losses.f90 subroutine, convergence takes much more iterations to be achieved, compared to the case without the subroutine. But, the strange thing is that the final converged solution features exactly the same pressure field, even if a use a huge value of ckupdc as:
ckupdc(ielpdc,3) = 100000.d0*vit
One more thing I noted is that if I use ‘all[]’ instead of ‘zone_name’ inside the getcel, the calculation blocks (with no printed error) after the first iteration, and one has to kill it in order to stop it.
Thanks in advance.
Best regards,
Daniele
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: get cel of a volume region zone
Hello,
Could you post a small example which shows this behavior. Or at least post "listing" files with or without head losses ?
Regards,
Yvan
Could you post a small example which shows this behavior. Or at least post "listing" files with or without head losses ?
Regards,
Yvan
Re: get cel of a volume region zone
Dear Yvan
Attached you will find the listing of the simulation with and without head losses, and the cs_user_head_losses.f90 I use.
As you can see, max, min and mean values at the final iteration are the same for the two simulations.
Thank you in advance.
Regards,
Daniele
Attached you will find the listing of the simulation with and without head losses, and the cs_user_head_losses.f90 I use.
As you can see, max, min and mean values at the final iteration are the same for the two simulations.
Thank you in advance.
Regards,
Daniele
- Attachments
-
- cs_user_head_losses.f90
- (7.94 KiB) Downloaded 308 times
Re: get cel of a volume region zone
With the attached files that failed to get attached in the previous post...
Daniele
Daniele
- Attachments
-
- listing_with_head.7z
- (526.25 KiB) Downloaded 299 times
-
- listing_no_head.7z
- (102.09 KiB) Downloaded 298 times