CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

OpenFoam c++ syntax for min(... ) equation ?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   November 6, 2015, 17:52
Default OpenFoam c++ syntax for min(... ) equation ?
Senior Member
Join Date: Mar 2009
Posts: 119
Rep Power: 10
klausb is on a distinguished road

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.

klausb is offline   Reply With Quote

Old   November 6, 2015, 18:01
Senior Member
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,798
Rep Power: 30
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym

it depends. See

So basically you add one more min:

fynew = min(fy, min(1.0, 0.5+0.0025*Rt))
alexeym is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 12:54
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
OpenFOAM file syntax amtri OpenFOAM 5 August 28, 2010 07:19
Hentalpy equation openfoam - miss a term lions85 OpenFOAM 2 August 18, 2010 12:12
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16

All times are GMT -4. The time now is 10:21.