CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Laminar Flame Speed Models with hCombustionThermo (http://www.cfd-online.com/Forums/openfoam/79968-laminar-flame-speed-models-hcombustionthermo.html)

mturcios777 September 9, 2010 16:34

Laminar Flame Speed Models with hCombustionThermo
 
I am attempting to use the included laminar flame speed models to return a reference field (I need the Gulder laminar flame speed for methane at the pressures and temperatures of the current field).

My code uses hCombustionThermo instead of hhuCombustion thermo. I've copied over the Gulders directory in src/thermophysicalModels/laminarFlameSpeed and renamed it myGulders. Besides modification of makefiles and changes in names, what other parts would require changing to work with hCombustionThermo?

Thanks in advance

mturcios777 September 10, 2010 15:58

A little update
 
Its going to be a little bit more involved than that, so I've made some progress. Just in case I want to use other flame speed models, I've taken the following steps:

1. Copied over the entire laminarFlameSpeedModels directory and renamed (myLams lets say).
2. Replace all instances of hhuCombustionThermo with hCombustionThermo
3. Change any references to member variables of hhuCombustionThermo to member variables of hCombustionThermo (this is more an implementation thing, and I'll likely need to change this later to get answers that make sense to my application)
4. Change Make/files to compile the library with a new name (libMyLams.so)
5. Execute ./Allwmake from the thermophysicalModels directory

That works, and now I can call

autoPtr<laminarFlameSpeed> uSl
(
laminarFlameSpeed::New(thermo)
);

And it works. What I'd like to know now is how to create a volScalarField with the laminar flame speed written in every time directory (won't need it all the time, but for initial diagnosis it would be important to be able to see this).

Anyone worked with laminarFlameSpeedModels before? Thanks.

mturcios777 September 15, 2010 18:19

Well, at least this may give people some help. Since the hhuCombustionThermo version returns the laminar flame speed with the member function

uSL()()

[using nomenclature from last post]. Since I want to supply the equivalence ratio field (which I calculate somehow) as a const volScalarField&, I needed to change all the definitions and declarations of the ()() function to be ()(const volScalarField & phi). This is the only way for the code to compile, but on the plus side I am free to use all the flame speed models at runtime, so long as they are modified properly.


All times are GMT -4. The time now is 01:39.