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
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.
|All times are GMT -4. The time now is 16:43.|