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

Solving an additional equation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2005, 14:27
Default Dear all, since I'm doing s
  #1
rene
Guest
 
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:
HELP1_
(
IOobject
(
"HELP1",
runTime_.timeName(),
runTime_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh_,
dimensionedTensor
(
"zero",
R_.dimensions(),
tensor
(
1,0,0,
0,2,0,
0,0,3
)
)
).

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

HELP1_ = R_;

tmp<fvtensormatrix> HELP1Eqn
(
fvm::ddt(HELP1_)
==
P
);

solve(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,

Rene
  Reply With Quote

Old   May 11, 2005, 14:34
Default The problem is that you have n
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
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, 04:36
Default Thanks Henry! After setting
  #3
rene
Guest
 
Posts: n/a
Thanks Henry!

After setting 'MUST_READ' to HELP1_ all works fine.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
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 13: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 11:45.