CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Solving an additional equation

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

LinkBack Thread Tools Display Modes
Old   May 11, 2005, 13:27
Default Dear all, since I'm doing s
Posts: n/a
Dear all,

since I'm doing some testing of a modified turbulence model based upon the LRR implementation, I'd like to solve an additional equation for a tensor field giving me an idea about its quality - this field should be a copy of R_.

I browsed all the messages posted here, but, unfortunately, cannot find a solution of my problem.

First of all, I defined a new 'volTensorField' in my .H-File I named 'HELP1',

tmp<voltensorfield> HELP1() const
return HELP1_;

which is set to a fixed set of values in .C afterwards:

To solve this, I copy the field values of R_ onto HELP1_ and define the additional equation as follwing:

HELP1_ = R_;

tmp<fvtensormatrix> HELP1Eqn


where 'P' has the correct dimensions. All the fvSchemes and other input-files are set, compilation is done without any messages and the code runs properly (I'm using turbFoam).

When I add another term on the left- or right-hand-side of 'HELP1Eqn' - i.e. + fvm::div(phi_, HELP1_) - I get the message from Foam

--> FOAM FATAL ERROR : gradientInternalCoeffs cannot be called for a calculatedFvPatchField.
You are probably trying to solve for a field with a calculated or default boundary conditions.

My question now: what's wrong here? Where is something missing? Do I have to modify an argument list?
This might be a stupid question - my last C++-course at uni is years ago - but I wouldn't mind some useful hints...

Thanks in advance,

  Reply With Quote

Old   May 11, 2005, 13:34
Default The problem is that you have n
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15
henry is on a distinguished road
The problem is that you have not set any boundary conditions for HELP1_ and have let them default to calculatedFvPatchField which of course you cannot use in a transport equation. You could either read HELP1_ and set the BCs in the file or obtain the BC types from R_.
henry is offline   Reply With Quote

Old   May 12, 2005, 03:36
Default Thanks Henry! After setting
Posts: n/a
Thanks Henry!

After setting 'MUST_READ' to HELP1_ all works fine.
  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
Transport equation for an Additional Variable HariBol CFX 2 November 26, 2007 17:07
Additional Variable - Diffusive Transport Equation RadheShyam Das CFX 3 October 18, 2007 12:35
Solving Additional Variable in CFX? Tuks CFX 6 November 18, 2005 12:40
Implementing additional equation? Pratap FLUENT 1 December 4, 2004 21:32
additional equation for heat transport Sascha Becker CFX 2 December 20, 1999 03:58

All times are GMT -4. The time now is 09:41.