Page 2 of 2

Re: how to setup periodic temperature for an LES of a cuboid

Posted: Fri Feb 20, 2015 2:12 pm
by mkendrick
Using valgrind was alot easier than anticipated!

The ivar values are as follows:

Code: Select all

 ivar for ustsnv
           2
 ivar for ustssc
           5
valgrind output file attached

Re: how to setup periodic temperature for an LES of a cuboid

Posted: Fri Feb 20, 2015 5:15 pm
by Yvan Fournier
Hello,

To use Valgrind with Code_Saturne, you need to tell the code to use valgring using the xml file (in the GUI, go to advanced parameters for the code execution options), or the user Python script.

In your run, Valgrind ran on the Python iterpreter used by the main script, not on the cs_solver executable itself...

Regards,

Yvan

Re: how to setup periodic temperature for an LES of a cuboid

Posted: Fri Feb 20, 2015 7:45 pm
by mkendrick
Ah, yes this ouput looks more like it.

Attached.

Re: how to setup periodic temperature for an LES of a cuboid

Posted: Sat Feb 21, 2015 12:46 am
by Yvan Fournier
Hello,

You have a memory overwrite in cs_user_boundary_conditions.f90. Checking your code, iscal is not initialized, so that is probably the cause of the error.

This may cause errors downstream, so you should fix this first, and check your run again (using Valgrind will help check everything is fixed, and if not, tell you where to look).

Regards,

Yvan

Re: how to setup periodic temperature for an LES of a cuboid

Posted: Mon Feb 23, 2015 12:19 pm
by mkendrick
I think I've traced the problem to

Code: Select all

kimasf
This value is used in the function below

Code: Select all

field_get_key_int(ivarfl(iu),kimasf,iflmas)
If I write the output of kimasf I get

Code: Select all

kimasf = 0
which I'm assuming is incorrect.

How do I initialize the 'kimasf'? or for my version (3.0.5) is there an easier way to find the mass flux?

Cheers,
Martyn

P.S. the two write errors were solved by replacing

Code: Select all

ivar=isca(iscal)
with

Code: Select all

ivar=isca(1)
in cs_user_boundary_conditions.f90

and the other which was in subroutine ustsnv was solved by copying the arguments and initializations from cs_user_source_terms.f90 found in the REFERENCE folder.