CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

repeating variables in one equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2014, 21:37
Default repeating variables in one equation
  #1
New Member
 
Join Date: Sep 2010
Location: Windsor, Ontario
Posts: 17
Rep Power: 15
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?
Thanks.
mehrdad_kbg is offline   Reply With Quote

Old   January 8, 2014, 06:06
Default
  #2
New Member
 
Michael Ranft
Join Date: Jun 2012
Location: Karlsruhe
Posts: 3
Rep Power: 13
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.



Code:
// define Cf
volScalarField Cf = ...here an initial expression

// modify Cf
Cf = 1.0/(((mm*ubulk/nul)*Cf)/0.435+5.05);
Micha
Azur is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
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
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 17:34.