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

repeating variables in one equation

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

LinkBack Thread Tools Display Modes
Old   January 6, 2014, 22:37
Default repeating variables in one equation
New Member
Join Date: Sep 2010
Location: Windsor, Ontario
Posts: 17
Rep Power: 7
mehrdad_kbg is on a distinguished road
I am trying to introduce Cf as a volScalarField but I get errors when I compile the code. The issue is that there is another Cf in the right hand side of the equation!

volScalarField Cf = 1.0/(((mm*ubulk/nul)*Cf)/0.435+5.05);

When I remove the Cf from the right hand side every thing works well. Any idea about writing this equation in OpenFOAM format?
mehrdad_kbg is offline   Reply With Quote

Old   January 8, 2014, 07:06
New Member
Michael Ranft
Join Date: Jun 2012
Location: Karlsruhe
Posts: 3
Rep Power: 5
Azur is on a distinguished road
The problem is not the equation. You can modify variables in this way.

But first you have to define Cf before you can use it on the right hand side of the equation.

// define Cf
volScalarField Cf = an initial expression

// modify Cf
Cf = 1.0/(((mm*ubulk/nul)*Cf)/0.435+5.05);
Azur 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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Wave Action Equation Solver for OpenFOAM chyczewski OpenFOAM Programming & Development 7 September 4, 2013 11:06
How to add bodyforce in momentum equation in viscoelasticFluidFoam? arshoon OpenFOAM Running, Solving & CFD 0 April 9, 2013 10:03
mass flow in is not equal to mass flow out saii CFX 2 September 18, 2009 08:07
Boundary conditions in a Poisson's equation? vincent Main CFD Forum 4 April 16, 1999 02:19

All times are GMT -4. The time now is 13:35.