0
how i can add the scale function in open foam

hello everyone

please how i can add a function to the differential equation in openfoam, especially the scale function,

like here

: fvm::ddt(T) - (1/(1+dfra(T)*Lat/(CP*eT)))*fvm::laplacian(DT, T) == fvOptions(T)

i can't difinde (dfra(T))

the function what i want add it is this:

int fraction(int n);

using namespace std;

double dfra (double a)

{

double r;

if(a>-0.5 && a<+0.5)

r=1;

else r=0;

return r;

}

Thank you


OpenFOAM 03-03-21, 8:10 p.m. MOKRANI_A
0
Hi, You can use the pos & neg functions for your case. Please find the link below for details.

https://openfoam.com/documentation/guides/latest/doc/openfoam-guide-expression-syntax.html

Regards,
Ashley
23-03-21, 2:15 p.m. ashleymelvin


0

the 'non-GUI' post-processing tools have Function objects can be listed by running a solver with the -listFunctionObjects option, e.g. volScalarFields for the Xi-based combustion models. add: Add a list of a field by a scale factor; streamFunction: Writes the steam-function.

TellPopeyes

12-04-21, 2:10 p.m. VeronicaHogan


0
I thought this was going to be some boring old post, but it really compensated for my time. www.emondagesaint-sauveur.com
29-09-21, 8:42 p.m. hervedew9561


Log-in to answer to this question.