|November 11, 2009, 12:54||
Join Date: Apr 2009
Posts: 13Rep Power: 8
I'm programming in OpenFoam and I have a problem.
I am using a chemistry solver for some simple burners simulation.
In the transport equation I need to put the reaction velocity with its unit measures (so it has to be dimensioned). my velocity is a volScalarField, and when I declare a volScalarField I use this way:
dimensionedScalar("RRfuel", dimensionSet(1,-3,-1,0,0,0,0), 0)
Then in the program I initialize the field, but in this case when I do that the right hand side and the left hand side of the equation need to be dimensioned with the same units.
The problem is that I want to initialize the scalarfield with a undimensioned right hand side. If I do that in the declaration after dimensionSet where instead of 0 I put for example 5, it works, the RR_Fuel will be dimensioned and with the value 5. I want to do the same but not in the declaration, and this is impossible because when I run the program it stops for the inconsistency of the units.
I hope you can understand my question, I was nebulous but it's very difficult to speak in english about this staff.
Thank you for your help
|November 12, 2009, 03:41||
Join Date: Mar 2009
Posts: 779Rep Power: 18
http://foam.sourceforge.net/doc/Doxy...onedField.html mention both a dimensions() method and a field() method. The latter is probably good starting place for solving your problem.
|Thread||Thread Starter||Forum||Replies||Last Post|
|How to create initiate a volScalarField p without reading from disk NO_READ does not seem to work||dbxmcf||OpenFOAM Running, Solving & CFD||12||August 22, 2013 07:32|
|Definition of a linear function as volScalarField||titio||OpenFOAM Running, Solving & CFD||1||October 3, 2010 16:51|
|Is there a way to change the name a volScalarField||liu||OpenFOAM Running, Solving & CFD||2||October 18, 2007 17:49|
|Wall distance volScalarField||r2d2||OpenFOAM Running, Solving & CFD||2||July 19, 2007 08:01|
|Problems with volScalarField||niklas||OpenFOAM Running, Solving & CFD||2||November 28, 2005 17:05|