No density variations on the tutorial "Heated square cavity flow"

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
vhamtiaux
Posts: 5
Joined: Tue Aug 29, 2023 1:53 pm

No density variations on the tutorial "Heated square cavity flow"

Post by vhamtiaux »

Hello,

I just installed code saturne version 8.0.1, the installation went well and I was trying to run the tutorials. The Driven Cavity case went well.
But I have an issue with "Heated square cavity flow" case. It runs without error but the result is not what is expected. Looking through the results it looks like there are no density variations. So the end results in something purely diffusive with no velocity and no density variations.
I should mention that I tried setting the case myself using the pdf guide of that case. As it did not work, I also used the setup.xml for that case that I found on the https://github.com/code-saturne/saturne-tutorial.

It always gives the same results with no density variation. Is this case working on version 7 and not 8 ? Do you have the same issues? Do you know what might be going wrong?

Thank you for your help,

Best regards,

Victoria
Yvan Fournier
Posts: 4100
Joined: Mon Feb 20, 2012 3:25 pm

Re: No density variations on the tutorial "Heated square cavity flow"

Post by Yvan Fournier »

Hello,

I just checked with the 8.0 branch (a few minor fixes beyond 8.0.1, not relevant here), using the setup from GitHub, and observe the correct behavior.

Did you run all 450 time steps ? Did you edit the setup.xml in another manner ? Could you otherwise post a run_solver.log and setup.log ?

Regards,

Yvan
vhamtiaux
Posts: 5
Joined: Tue Aug 29, 2023 1:53 pm

Re: No density variations on the tutorial "Heated square cavity flow"

Post by vhamtiaux »

Hello,

Thanks for your quick answer. Yes I run all 450 steps. I just re-runned it now straight form the github and I get the same results. I join the ".log" files.

Best regards,

Victoria
Attachments
setup.log
(30.11 KiB) Downloaded 313 times
run_solver.log
(2.31 MiB) Downloaded 315 times
Yvan Fournier
Posts: 4100
Joined: Mon Feb 20, 2012 3:25 pm

Re: No density variations on the tutorial "Heated square cavity flow"

Post by Yvan Fournier »

Hello,

Looking at your run_solver.log, it seems the user-defined function is not called.

You should find "min_rho" and "max_rho" lines in the file (as written by the user-defined functions).
Did you include the user-defined functions (files in SRC) from the tutorial ?

There is an old and recurring issue with Ubuntu (see bug report here https://bugs.launchpad.net/ubuntu/+sour ... ug/1672585), which initially affected installs packaged by Ubuntu (and not user-compiled installs), but which should be avoided at least for .c source files by a workaround we have since at least v7.0, so I hope this is not the case here, but simply missing C files... Please keep us informed.

Best regards,

Yvan
vhamtiaux
Posts: 5
Joined: Tue Aug 29, 2023 1:53 pm

Re: No density variations on the tutorial "Heated square cavity flow"

Post by vhamtiaux »

Hello,

yes the user-defined functions (files in SRC) are included.

But I have the same issue the tutorial "Stratified junction" that I also run exactly as in the github and that runs but I don't see any variations of density nor viscosity while in this case there is no user-defined function in a C file but the user law is already implemented from the gui. I join also the log files so you can see it by yourself aswell as the cs_meg_volume_function generated in the RESU/src folder.

Thanks a lot for your help,

Best regards,

Victoria
Attachments
setup.log
(33.01 KiB) Downloaded 313 times
run_solver.log
(666.72 KiB) Downloaded 335 times
cs_meg_volume_function.c
(2.67 KiB) Downloaded 340 times
Yvan Fournier
Posts: 4100
Joined: Mon Feb 20, 2012 3:25 pm

Re: No density variations on the tutorial "Heated square cavity flow"

Post by Yvan Fournier »

Hello,

The MEG generated functions are compiled and linked just the same as user-defined functions, so the underlying mechanism is the same. It is thus not surprising that you have the same issue.

I do not seem to have this issue on an Ubuntu 23.4 virtual machine with de development version of code_saturne compiled a few weeks ago, and I don not expect the behavior of 8.0.1 to be different (there has not been a significant change that I can remember of since last spring in this part of the code).

The problem could come from an issue with function priority (as of the described bug), but another, more rare issue encountered by one person 2 or 3 years ago was simply that the script ran the reference version, and not the one from the case. To check for that first, can you check "initialize only" in the advanced parameters of the code launch dialog box, and start the code ? It will not run, but in the RESU/<run_id> directory, you will obtain a "run_solver" file (a small script). Could you post that ? Its contents will help determine the next step.

Best regards,

Yvan
vhamtiaux
Posts: 5
Joined: Tue Aug 29, 2023 1:53 pm

Re: No density variations on the tutorial "Heated square cavity flow"

Post by vhamtiaux »

Hello,

I am still using Ubuntu 20.

Here is the run_solver file: I post it as a text as the extension of the file doesn't allow me to put the entire file :
1 #!/bin/bash
2
3 # Export paths here if necessary or recommended.
4 export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu":$LD_LIBRARY_PATH
5
6 # Library search path for code_saturne.
7 export LD_LIBRARY_PATH="/home/vhamtiaux/code_saturne/8.0.1/code_saturne-8.0. 1/arch/Linux_x86_64/lib":$LD_LIBRARY_PATH
8
9
10 export OMP_NUM_THREADS=1
11
12 cd "/home/vhamtiaux/Documents/saturne_test1/saturne-tutorials-main (1)/07_He ated_Square_Cavity/CASE1/RESU/20230831-0902"
13
14 # Run solver.
15 mpiexec.mpich -n 4 ./cs_solver --mpi "$@"
16 export CS_RET=$?
17
18 exit $CS_RET


Best regards,

Victoria
vhamtiaux
Posts: 5
Joined: Tue Aug 29, 2023 1:53 pm

Re: No density variations on the tutorial "Heated square cavity flow"

Post by vhamtiaux »

Hello,

it is ok, I just installed code_saturne on a debian cluster and it now seems to work. It would have been nice to run on my laptop but as long as I can run some cases I'm ok.

Thank you again for your help,

Best regards,

Victoria
Yvan Fournier
Posts: 4100
Joined: Mon Feb 20, 2012 3:25 pm

Re: No density variations on the tutorial "Heated square cavity flow"

Post by Yvan Fournier »

Hello,

Ok fine. If you want to run tests on your laptop, I can suggest a few things to try (to pinpoint and work around the issue), if you are ready for a few iterations.

Best regards,

Yvan
Post Reply