Variable viscosity mathematical expression editor

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
stefann
Posts: 25
Joined: Fri Oct 10, 2014 7:49 pm

Variable viscosity mathematical expression editor

Post by stefann »

I have a compressible model and would like to define a simple power law for the viscosity as a function of the temperature ratio (Tk/Trefk). When I go into the user expression, TempK is not one of the options available for Predefined Symbols.

In fact, even the examples tab has examples which use TempK as part of the equation. These examples give me an error when I paste them into User Expression. Error is: identifier TempK is unknown.

How do I use temperature for my equation?


Stefan
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Variable viscosity mathematical expression editor

Post by Yvan Fournier »

Hello,

I'll check next week if it is easy or not to add the temperature to the GUI here (if it is available as a property in this model, it should be easy; if it requires a user-defined temperature/enthalpy conversion, it may be harder).

In the meantime, the only solution seems to be to recourse to using the cs_user_physical_properties.f90 user subroutines for the variables depending on temperature...

Regards,

Yvan
Post Reply