|
[Sponsors] |
November 6, 2015, 17:52 |
OpenFoam c++ syntax for min(... ) equation ?
|
#1 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22 |
Hello,
what is the OpenFoam c++ syntax for the following equation: fynew = min(fy, 1.0, 0.5+0.0025*Rt) where fy and Rt are known equations. Klaus |
|
November 6, 2015, 18:01 |
|
#2 |
Senior Member
|
Hi,
it depends. See http://en.cppreference.com/w/cpp/algorithm/min. So basically you add one more min: fynew = min(fy, min(1.0, 0.5+0.0025*Rt)) |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
effect of mass transfer on pressure equation in OpenFoam | rapierrz | OpenFOAM Running, Solving & CFD | 0 | October 10, 2015 13:54 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
OpenFOAM file syntax | amtri | OpenFOAM | 5 | August 28, 2010 08:19 |
Hentalpy equation openfoam - miss a term | lions85 | OpenFOAM | 2 | August 18, 2010 13:12 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |