Page 1 of 1
Thermal source terms
Posted: Wed Jan 22, 2014 1:18 am
by fomeh
Hello,
I am pretty new to user subroutines. I want to use thermal volumetric source in specific areas of a domain. I am trying to use ustssc.f90 to do that. The compliation part is done but something is wrong cause the temprature remains always constant for all itterations. Can someone give me some ideas what might be wrong with that.
Thank you
Re: Thermal source terms
Posted: Wed Jan 22, 2014 4:10 pm
by Jacques Fontaine
Hello,
Wich version of Code_Saturne is used ?
Your program seems good. Are you sure about "X > 0" criteria (print nlelt to check that your volume selection is OK).
Regards,
Re: Thermal source terms
Posted: Wed Jan 22, 2014 4:52 pm
by fomeh
Merci Jacques
I'am using V3. Concerning X>0, i changed it several times in different direction just to make sure that the problem does not come from this condition but finally withoyt success, the temprature remains constant as the initial value. Do i have to change some other parameters from the GUI? i really don't have any idea about what to test
Re: Thermal source terms
Posted: Wed Jan 22, 2014 8:24 pm
by fomeh
Jacques Fontaine wrote:Hello,
(print nlelt to check that your volume selection is OK).
Regards,
I tried to print nlet, a half of the domain has been selected, there is no selection issue
Re: Thermal source terms
Posted: Thu Jan 23, 2014 12:18 am
by Yvan Fournier
Hello,
Did you get your utssc.f90 file from a version 2.0 setup ? In Version 3.0, the subroutine is in cs_user_source_terms.f90. The name of the file is not important, but the number of arguments to the routine.is.
When going from one version to another, you may need minor adaptations to the code. Copy/past the bulk of the function body, test compilation, and adapt if you want, but never use a user (or non-user) subroutine from different versions x.y.z if x or y are different.
Best regards,
Yvan
Re: Thermal source terms
Posted: Thu Jan 23, 2014 12:23 am
by fomeh
Thanks Yvan,
Yes i got this subroutine from V3 with the original name :cs_user_source_terms.f90, i changed the name my self. I attached my .xml file if you can take a look
Yvan Fournier wrote:Hello,
Did you get your utssc.f90 file from a version 2.0 setup ? In Version 3.0, the subroutine is in cs_user_source_terms.f90. The name of the file is not important, but the number of arguments to the routine.is.
When going from one version to another, you may need minor adaptations to the code. Copy/past the bulk of the function body, test compilation, and adapt if you want, but never use a user (or non-user) subroutine from different versions x.y.z if x or y are different.
Best regards,
Yvan
Re: Thermal source terms
Posted: Thu Jan 23, 2014 3:06 am
by Yvan Fournier
Hello,
The version you use seems to date from before a revision on September 3, 2012 (removing coefa/coefb), which is before the version 3.0 branch was pulled, and before even 3.0-rc1.
Please upgrade to a real 3.0 version.
Regards,
Yvan
Re: Thermal source terms
Posted: Thu Jan 23, 2014 5:55 pm
by fomeh
Thank you very much Yvan, it seems to work as far as now but i have to continue with the real case.
I have another question concerning this subroutine. The french version 1 says:
C ATTENTION on suppose qu'on travaille en enthalpie,
465 C si on travaille en temperature, il ne faut pas oublier de
466 C diviser PWATT par Cp
And in english version for the same part:
! It is assumed here that the thermal scalar is an enthalpy.
! If the scalar is a temperature, PWatt does not need to be devided
! by Cp ...
So is there any modification in V3?
Re: Thermal source terms
Posted: Tue Feb 04, 2014 4:59 pm
by Brian Angel
Hello,
To reply to your question, there is a change between versions 2.2 and 2.3. In all versions from 2.3 onwards, there is no need to divide by Cp when specifying a volumetric power source term.
Regards,
Brian Angel.