|
[Sponsors] |
November 11, 2009, 12:54 |
dimensioned volScalarField
|
#1 |
New Member
Emanuele Leoni
Join Date: Apr 2009
Posts: 13
Rep Power: 17 |
Hi,
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: volScalarField RR_Fuel ( IOobject ( "RR_Fuel", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, 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 bye EManuele |
|
November 12, 2009, 03:41 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
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. |
||
|
|
Similar Threads | ||||
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 | 14 | March 25, 2022 07:08 |
Wall distance volScalarField | r2d2 | OpenFOAM Running, Solving & CFD | 3 | October 10, 2018 13:54 |
Definition of a linear function as volScalarField | titio | OpenFOAM Running, Solving & CFD | 1 | October 3, 2010 17:51 |
Is there a way to change the name a volScalarField | liu | OpenFOAM Running, Solving & CFD | 2 | October 18, 2007 18:49 |
Problems with volScalarField | niklas | OpenFOAM Running, Solving & CFD | 2 | November 28, 2005 17:05 |