Page 1 of 1
question about density variable
Posted: Tue Apr 14, 2020 4:28 am
by hi.will
hello,
Under windows10, code_saturne V5.0;
I'm try to learning a hearted squar cavity case following tutorial HeatedSquareCavity.pdf. I have set Density variable and put the cs_user_physical_properties.f90 under SRC.But the density in density box which next 'Density variable' in GUI will be density=-1, and it cause compile error like
'solver script exited with status 1.
Error running the calculation.
Check Code_Saturne log (listing) and error* files for details.
Error in calculation stage. '
If I set density= +constant(such as 1.0) in density box,the compute process is ok ,but all the density in listing file equal to +constant.
As if the cs_user_physical_properties.f90 doesn't work?Where am I wrong please?
Re: question about density variable
Posted: Tue Apr 14, 2020 11:55 am
by Yvan Fournier
Hello,
Without the information as in the forum recommendations, i is very difficult to guess what is going wrong.
Regards,
Yvan
Re: question about density variable
Posted: Wed Apr 15, 2020 2:37 am
by hi.will
thanks Yvan,here are files when density=-1, compile.log,preprocessor.log, and setup.log.The listing file can't be transfered by forum.
Re: question about density variable
Posted: Wed Apr 15, 2020 2:41 am
by hi.will
hi Yvan.Here also listing file.I changed the file name.
thanks.
Re: question about density variable
Posted: Wed Apr 15, 2020 2:28 pm
by Yvan Fournier
Hello,
I see the error message, but am unable to guess at what you have in your xml file and user subroutines.
Best regards,
Yvan
Re: question about density variable
Posted: Wed Apr 15, 2020 4:01 pm
by hi.will
Hello,
here are files of setup.xml and cs_user_physical_properties.f90
thanks.
Re: question about density variable
Posted: Wed Apr 15, 2020 10:37 pm
by Yvan Fournier
Hello,
Could you try (in either order):
a) setting the density to another value in the GUI (for example 1); if the GUI does not let you do this (i.e. if the editot pop-up does not appear, you could change it directly in the xml file at least for testing (search for "Density")
b) in your user subroutine, start with a simple, constant value to check if the issue is due to formula values becoming negative for some temperature values.
Best regards,
Yvan
Re: question about density variable
Posted: Thu Apr 16, 2020 4:15 am
by hi.will
Hello,
the cs_user_physical_properties.f90 was copied from code-saturne V3.3.4, i have just made some changes to compile OK(didn't change any formulas in subroutine).
i have tried,
a)setting the density=1.0 in the GUI popup window. Then the result of all the densties in listing file items 'Computed fields on cells' equal to 1 .please see listinga.log file.
b)keeping the density=1.1 in the cs_user_physical_properties.f90,but the GUI popup window unchanged(density=1.0).Then all the densties in listing file items 'Computed fields on cells' equal to 1 .please see listingb.log file.
thanks
Re: question about density variable
Posted: Thu Apr 16, 2020 9:21 am
by Yvan Fournier
Hello,
I do not know if this explains your error, but you should never just copy a user subroutine from another x.y.z version when x or y are different from the current version.
In your case, usphyv does not even have the same number of arguments.
So you should first align your user subroutine with the reference for the version you are using.
If this still fails, if the popup in the GUI works correctly, you can use a formula there instead of the user subroutine.
Regards,
Yvan