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

Defining custom Cp library under 2.2.x

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

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2013, 20:13
Default Defining custom Cp library under 2.2.x
  #1
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 13
ChrisA is on a distinguished road
I'm trying to update my code to run with 2.2.x and part of doing this involves porting over our Cp and viscosity libraries. Prior to this, declaring a new library for the various thermotypes involved adding the thermotype to the list of thermotypes in the *thermos.C files (like psiThermos.C). For example:

Code:
makeThermo
(
    psiThermo,
    hePsiThermo,
    pureMixture,
    sutherlandTransport,
    sensibleEnthalpy,
    myJanafThermo,
    perfectGas,
    specie
);
This seems to not be sufficient in the new version. With the new ThemoType definitions there seems to be an additional place to declare the new library name.... what leads me to believe this is at runtime my code gives the following error:

Code:
Unknown psiThermo type 
thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       sutherland;
    thermo          myJanaf;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}


Valid psiThermo types are:

type            mixture                    transport   thermo      equationOfState  specie            energy    
...
hePsiThermo     pureMixture                sutherland  janaf       perfectGas       specie            sensibleInternalEnergy  
hePsiThermo     pureMixture                sutherland  perfectGas  specie           sensibleEnthalpy                          
hePsiThermo     reactingMixture            const       hConst      perfectGas       specie            sensibleEnthalpy  
...
You'll notice that the place where "myJanaf" should appear as a valid choice is blank shoving all the columns over to the side. I interpret this as the runtime selection table is reading the thermotypes from psiThermos.C and picking out the valid thermotypes but when it gets to "myJanafThermo" it can't recognize it and it skips over it.

Does anyone know where this magic happens? Or what I'm missing? I've spent far more time than any one person should trying to find this and I can't imagine I'm alone in having this issue.

Also related is that upon execution the code spews the following:

Code:
Duplicate entry irreversibleArrheniusReaction in runtime selection table Reaction
#0    /opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x25) [0x7ffd89369cd5]
#1    /home/carisman/OpenFOAM/carisman-2.2.0/platforms/linux64GccDPOpt/lib/libRCBFV2.0Specie.so(+0x148e9c) [0x7ffd8acd3e9c]
#2    /lib64/ld-linux-x86-64.so.2(+0xf306) [0x7ffd8dac6306]
#3    /lib64/ld-linux-x86-64.so.2(+0xf3df) [0x7ffd8dac63df]
#4    /lib64/ld-linux-x86-64.so.2(+0x16ea) [0x7ffd8dab86ea]
Duplicate entry irreversibleArrheniusReaction in runtime selection table Reaction
#0    /opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x25) [0x7ffd89369cd5]
#1    /home/carisman/OpenFOAM/carisman-2.2.0/platforms/linux64GccDPOpt/lib/libRCBFV2.0Specie.so(+0x14fc88) [0x7ffd8acdac88]
#2    /lib64/ld-linux-x86-64.so.2(+0xf306) [0x7ffd8dac6306]
#3    /lib64/ld-linux-x86-64.so.2(+0xf3df) [0x7ffd8dac63df]
#4    /lib64/ld-linux-x86-64.so.2(+0x16ea) [0x7ffd8dab86ea]
Duplicate entry reversibleArrheniusReaction in runtime selection table Reaction
#0    /opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x25) [0x7ffd89369cd5]
#1    /home/carisman/OpenFOAM/carisman-2.2.0/platforms/linux64GccDPOpt/lib/libRCBFV2.0Specie.so(+0x14fc34) [0x7ffd8acdac34]
#2    /lib64/ld-linux-x86-64.so.2(+0xf306) [0x7ffd8dac6306]
#3    /lib64/ld-linux-x86-64.so.2(+0xf3df) [0x7ffd8dac63df]
#4    /lib64/ld-linux-x86-64.so.2(+0x16ea) [0x7ffd8dab86ea]
for what appears to be all of the runTime selection tables... or something, I don't completely understand whats going on there but it started happening as I added my thermotype so I imagine (hope) both issues resolve themselves together as soon as I find the piece of the puzzle I'm missing.
mgg likes this.
ChrisA is offline   Reply With Quote

Old   July 16, 2013, 20:34
Default
  #2
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 13
ChrisA is on a distinguished road
For some reason 90% of the time I post something here I find the answer 5 minutes later. It looks like I was missing the following in my janaf code:

Code:
        //- Return the instantiated type name
        static word typeName()
        {
            return "janaf<" + EquationOfState::typeName() + '>';
        }
I guess stopping for a minute to put a problem to "paper" is enough to jar the brain into a different and often more productive thinking state Although I'm still getting the duplicate entry stuff at the start of my code... for reasons unknown.
vitors and TomasDenk like this.
ChrisA is offline   Reply With Quote

Old   September 14, 2013, 06:28
Default
  #3
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Dear ChrisA:
I have some problem like you.I want use the thermo type as the following:

thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;
energy absoluteEnthalpy;
equationOfState perfectGas;
specie specie;
}
but class hePsiThermo only have "sensibleEnthalpy" insteadingof "absoluteEnthalpy".In 2.2.1,only when I use heheuPsiThermo,can I use "absoluteEnthalpy".So I have to according to class heheuPsiThermo to add "absoluteEnthalpy" in class hePsiThermo .However,when I run my case,the error showed me that there no change with "Valid psiThermo types ".In other word ,my modifies did not work.the file I modified is "thermophysicalModels/reactionThermo/psiReactionThermos.C"I just put the following code:
makeReactionThermo
(
PsiThermo,
PsiReactionThermo,
hePsiThermo,
reactingMixture,
sutherland,
absoluteEnthalpy,
janafThermo,
perfectGas,
specie;
) and #include "absoluteEntalpy.H" to psiReactionThermos.C.As you know ,it did not work.could you tell me how to modify psiReactionThermos.C to make my difined thermo type :
{
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;
energy absoluteEnthalpy;
equationOfState perfectGas;
specie specie;
}to be useful?
I think you can tell me something about my problem.With your post,abviously,you know of2.2.1 better then me.
Please!
zqlhzx is offline   Reply With Quote

Old   September 14, 2013, 07:14
Default
  #4
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
OK here is how you enable e.g. the absolute enthalpy in your solver. The coding involved is very simple, once you know what to do.
1. Create a new library that assembles the necessary bits:
I attached a zip archive with the necessary code to include the standard OpenFOAM absolute enthalpy thermo, but this can be extended easily to own implementations of e.g. Cp or viscosity as well.

2. Link your solver against that new library:
I assume you know how to link your solver against new libraries, at least there should be some tutorial/wiki somewhere.

@ChrisA: Just out of curiosity, which new "Cp and viscosity libraries" do you wanna implement?

-Armin
Attached Files
File Type: gz myThermo.tar.gz (1.6 KB, 317 views)
Bahram likes this.
dkxls is offline   Reply With Quote

Old   September 14, 2013, 14:04
Default
  #5
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 13
ChrisA is on a distinguished road
That looks marvelously simple, I knew there had to be an easy way to add things to the run time selection table... I just never thought of compiling a new library with them in there. (The run time selection stuff is still largely a mystery to me) I'll give it a try when I get a chance, thank you for posting that.

With regards to the libraries I want to implement, the Cp one is simply a higher order polynomial fit than what JanaF uses. I'm fitting a polynomial to Cp for temperatures between 50K and 500K and an extra coefficient makes the fit much better. (rather than fitting -everything- using the polynomial thermotypes). The viscosity model is a kinetic theory based viscosity model... however that is less important as I would need to change how viscosity is mixed at present... So mostly this is so I can have an extra coefficient on the end of my JanaFesq Cp polynomial >.>.
ChrisA is offline   Reply With Quote

Old   September 14, 2013, 22:23
Default
  #6
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Dear dkxls:
Thank you very much for you reply and your zip archive !But I have some thing can not understang.Would you tell me some explainasions?
1.According your new library myThernmo,There should be only myThermos.C,myThermoTypes.H,and file of "make" in myThermos.What do other file work in your myThernmo?
2.I delete other file leaving myThermos.C,myThermoTypes.H,files and options in "make".I don not chang any codes and use "wmake "with myThernmo.Then,I add "libs("myThermos.so");" in the controlDict of my case.when I run my case,it gives me error:
From function dlopen(const fileName&,const bool)
in file POSIX.C at line 1179
dlopen errer:myThermos.so:can notopenshared object file:Nosuch file or diretory
I have not linked solver against new libraries before.please give a guide to define my thermotype:
thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;
energy absoluteEnthalpy;
equationOfState perfectGas;
specie specie;
}in your mythermo.I think it is easy to give me advise for you.please,please!
zqlhzx is offline   Reply With Quote

Old   September 15, 2013, 04:43
Default
  #7
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Dear dkxls:
I can link solver against new libraries.I successed to build myThermos.so,and I add the codes:libs("libThermos.so") in the start of "controlDict".Then I run my case,it still give me error:
FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : /home/administrator/OpenFOAM/administrator-2.2.1/platforms/linuxGccDPOpt/lib/libmyThermos.so: undefined symbol: _ZN4Foam15chemistryReaderINS_19sutherlandTransport INS_7species6thermoINS_11janafThermoINS_10perfectG asINS_6specieEEEEENS_16absoluteEnthalpyEEEEEE30dic tionaryConstructorTablePtr_E
--> FOAM Warning :
From function dlLibraryTable:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libmyThermos.so".
I think myThermotypes.H may have something wrong,and I also can not understand the codes in your myThermotypes.H .Attachement is my new lirary accoring to your zip archive .Plese take a look on my attachement,and could you give me some advice ?Thanks inadvance!
zqlhzx is offline   Reply With Quote

Old   September 15, 2013, 05:54
Default
  #8
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
I have upload my attachement,myThermo.zipplease help me to have a look!

Last edited by zqlhzx; September 15, 2013 at 07:09.
zqlhzx is offline   Reply With Quote

Old   September 15, 2013, 08:43
Default
  #9
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
@zqlhzx:
After having a closer look at what you actually wanna do, I just can recommend you to use 'sensibleEnthalpy'!

The whole OpenFOAM chemistry implementation is build for sensible enthalpy. In particular, the 'chemistryReader' and 'chemistrySolver' classes are build around sensible enthalpy. Also the top-level solver (e.g. 'chemFoam', 'reactingFoam', ...) are build for sensible enthalpy, as they all include the source term from chemistry in their transport equations.
Now you can "easily" implement all this also for absolute enthalpy, but it involves some more coding than just building the thermodynamics for absolute enthalpy.

If you don't want to change/implement all these things for absolute enthalpy you should just use the sensible enthalpy.

From the thermo-chemistry point of view, it doesn't really matter if you are using absolute or sensible enthalpy, you just have to implement it accordingly - but the end result won't change!
dkxls is offline   Reply With Quote

Old   September 15, 2013, 08:57
Default
  #10
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
Quote:
Originally Posted by ChrisA View Post
I'm fitting a polynomial to Cp for temperatures between 50K and 500K and an extra coefficient makes the fit much better. (rather than fitting -everything- using the polynomial thermotypes).
Ah, ok I see. Sounds good!

Quote:
Originally Posted by ChrisA View Post
The viscosity model is a kinetic theory based viscosity model... however that is less important as I would need to change how viscosity is mixed at present...
I use for accurate temperature depended viscosity data a polynomial expression (the same as in CHEMKIN):
ln(mu) = sum_i=1^N( a[i] * ln(T)^(i-1) )

I submitted the implementation to OpenFOAM (mantis bug #978), but the developers haven't included it yet. The code, is a straight forward implementation based on the polynomialTransport class and available in the bug report:
http://www.openfoam.org/mantisbt/view.php?id=978

For mixture I use the formulations due to Wilke (viscosity) and Mathur (conductivity), but I haven't contributed that code to OpenFOAM yet.
dkxls is offline   Reply With Quote

Old   September 15, 2013, 09:55
Default
  #11
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Dear dkxls:
Do you mean that I also have to change 'chemistryReader' and 'chemistrySolver' classes if I want to build my own thermo type:
thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;
energy absoluteEnthalpy;
equationOfState perfectGas;
specie specie;}?In other word ,most users who use OF2.2.1 only can use sensibleEnthalpy.I found just XiFoam,PDRFoam and engineFoam use absoluteEnthalpy,but the there solvers are only used in premixed-combustion or partly-premixedcombustion.Compare with old vision,we can use absoluteEnthalpy like in reactingFoam or FireFoam.So I do not think it is not more convenient than old vision when using thermo class to define thermo type in OF2.2.1.Why do OpenFoam change thermo class?I can not understand.
zqlhzx is offline   Reply With Quote

Old   September 16, 2013, 04:08
Default
  #12
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
Quote:
Originally Posted by zqlhzx View Post
Do you mean that I also have to change 'chemistryReader' and 'chemistrySolver' classes if I want to build my own thermo type...?
I right now don't know exactly what would be needed to get this also working with absoluteEnthalpy, but at least you need to instantiate the 'chemistrySolver' with absoluteEnthalpy as well (in a similar way as I did with makeReactionThermo).
Also, you need to take care of the source terms in the transport equations!!!

Quote:
Originally Posted by zqlhzx View Post
In other word ,most users who use OF2.2.1 only can use sensibleEnthalpy.I found just XiFoam,PDRFoam and engineFoam use absoluteEnthalpy,but the there solvers are only used in premixed-combustion or partly-premixedcombustion.
The solvers you mention don't use the chemistry classes, hence no restriction from that side.
So yes, if you want to use a chemistry solver you are limitied to sensibleEnthalpy in standard OpenFOAM.

Quote:
Originally Posted by zqlhzx View Post
Why do OpenFoam change thermo class?I can not understand.
Well the new thermo classes bring many really good changes and remove a lot of duplicated code! Even if there are right now not that many new features, the infrastructure is now in place to add them!

But why would you anyways want to use absoluteEnthalpy instead of sensibleEnthalpy?
I don't see any reason for this! Seems right now only to be trouble with no advantage whatsoever!
In fact, I do understand why the OpenFOAM developers preferred sensibleEnthalpy over absoluteEnthalpy enthalpy, especially when thinking of sprays and other source terms in the transport equations.
But as already said, it's mainly a matter of taste which which one you choose, the results is the same in the end!
dkxls is offline   Reply With Quote

Old   September 16, 2013, 04:53
Default
  #13
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Dear dkxls:
Thanks for your reply again.The solver I use is not developed by myself.It is based on openfoam2.0.1.My teacher ask me to make the solver use in openfoam2.2.1.Although the solver is used to simulation combustion ,but it do not solver transport equation and do not use chemistry solver.Due to the conbustion model the solver uses ,I have to use absoluteEnthalpy,and the original solver(2.0.1) also use absoluteEnthalpy.It is why I use absoluteEnthalpy.
Today,I use your attached file "myThermo" without any change.when I run my case,I found there are more two thermotype you defined as following:
thermoType
{
type hePsiThermo;
mixture multiComponentMixture;
transport sutherland;
thermo janaf;
energy absoluteEnthalpy;
equationOfState perfectGas;
specie specie;
}
thermoType
{
type hePsiThermo;
mixture multiComponentMixture;
transport sutherland;
thermo hConst;
energy absoluteEnthalpy;
equationOfState perfectGas;
specie specie;
}
However if I replace "multiComponentMixture" to "reactingMixture" and add "#include "reactingMixture.H" in your myThermos.C,then run command "wmake libso" and run my case,it gives me error.There have no new thermotype combination.I really do not understand.Is it related to the number in file "PaxHeaders.8962",what does other file which contain numbers use?The numbers are like:
30 mtime=1379156401.926678512
30 atime=1379156401.926678512
30 ctime=1379156401.929678475

30 mtime=1379156508.559345421
30 atime=1379156508.559345421
30 ctime=1379156508.566345333
Does the keyword "multiComponentMixture" corresponding to these numbers?If it is ,what numbers can corresponding to "reactingMixture"?please give me some advise,thank you in advance!
zqlhzx is offline   Reply With Quote

Old   September 16, 2013, 05:43
Default
  #14
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
Quote:
Originally Posted by zqlhzx View Post
Although the solver is used to simulation combustion ,but it do not solver transport equation ...
This sound strange! Or is it a 0-dim case, i.e. something like CHEMKIN or chemFoam?

Quote:
Originally Posted by zqlhzx View Post
...and do not use chemistry solver.
Well, if you don't use the chemistry solver, then just get rid of this stuff altogether and use psiReactionThermo without the chemistry part.
The code in createFields.H should then look something like this (similar to PDRFoam):
Code:
    autoPtr<psiReactionThermo> pThermo
    (
        psiReactionThermo::New(mesh)
    );
    psiReactionThermo& thermo = pThermo();
    thermo.validate(args.executable(), "ha");
Then you should actually be able to use 'myThermo' without changes, hence you use 'multiComponentMixture' instead of 'reactingMixture'.
IIRC, the 'reactingMixture' is a 'multiComponentMixture' plus some chemistryReader stuff.
dkxls is offline   Reply With Quote

Old   September 16, 2013, 08:56
Default
  #15
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Dear dkxls:
As you say,I use CHEMKIN in my solver.
Quote:
if you don't use the chemistry solver, then just get rid of this stuff altogether and use psiReactionThermo without the chemistry part.
I am sorry to do not understanding your words "get rid of this stuff ".what does the "stuff" refer to ?Is file of PaxHeaders.8962 or file in chemistry class?
I changed codes in my createFields.H as you say ,but do not get rid of "this stuff".My thermopysicalProperties is as following:
FoamFile
{
version 2.0;
format binary;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type hePsiThermo;
mixture multiComponentMixtureMixture;
transport sutherland;
thermo janaf;
energy absuluteEnthalpy;
equationOfState perfectGas;
specie specie;
}
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat";
inertSpecie N2;

/************************************************** *******************/
when I run my case ,it gives me error : keyword species is undefined in dictionary "/home/.../thermophysicalProperties".My specises is defined in chem.inp,why it still give me error?
Quote:
chem.inp :
ELEMENTS C H O N END
SPECIES CH3COCH3 C2H6 O2 H2O CO CO2 H2 CH2CO CH4 CH2O C2H4 C2H2 H2O2 C3H6O CH3OH C3H6 C3H8 OH N2 END
REACTIONS
2CH3COCH3 + C2H6 + 11.5O2 = 8CO2 + 9H2O 5.2e16 0 14906
END
Quote:
Then you should actually be able to use 'myThermo' without changes, hence you use 'multiComponentMixture' instead of 'reactingMixture'.
IIRC, the 'reactingMixture' is a 'multiComponentMixture' plus some chemistryReader stuff.
Do you mean I have to use multiComponentMixture because my solver does not use chemistry slover?If I have to use reactingMixture ,what shoud I do?For me ,you are a kinds expert in openfoam.
zqlhzx is offline   Reply With Quote

Old   September 16, 2013, 10:30
Default
  #16
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
This looks very much like you are using the OpenFOAM chemistry solver and the CHEMKIN reader!
I have just one recommendation for you in this case: Use sensibleEnthalpy!
dkxls is offline   Reply With Quote

Old   September 16, 2013, 12:03
Default
  #17
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Thank you for all your replys !I will have a try.
zqlhzx is offline   Reply With Quote

Old   September 18, 2013, 17:23
Default
  #18
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 13
ChrisA is on a distinguished road
Quote:
Originally Posted by dkxls View Post
I use for accurate temperature depended viscosity data a polynomial expression (the same as in CHEMKIN):
ln(mu) = sum_i=1^N( a[i] * ln(T)^(i-1) )

I submitted the implementation to OpenFOAM (mantis bug #978), but the developers haven't included it yet. The code, is a straight forward implementation based on the polynomialTransport class and available in the bug report:
http://www.openfoam.org/mantisbt/view.php?id=978

For mixture I use the formulations due to Wilke (viscosity) and Mathur (conductivity), but I haven't contributed that code to OpenFOAM yet.
So what unspeakable deeds does one have to preform to sneak a peek at your Wilke viscosity mixture code? I'd be very interested in seeing how you did it.
ChrisA is offline   Reply With Quote

Old   September 22, 2013, 04:32
Default
  #19
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Dear dkxls:
I have used "sensibleEnthalpy" to run my case,but the temperature is not right and it is lower than before.I think it is related to "sensibleEnthalpy" I used.I should use "absoluteEnthalpy " solver the problem.
You have said to me that :
Quote:
I right now don't know exactly what would be needed to get this also working with absoluteEnthalpy, but at least you need to instantiate the 'chemistrySolver' with absoluteEnthalpy as well (in a similar way as I did with makeReactionThermo).
I changed makeChemistrySolvers.C and makeChemistrySolverTypes.H in a similar way like you.But it failed.please take a look on my attachment.
As you said,the 'reactingMixture' is a 'multiComponentMixture' plus some chemistryReader stuff. So ,I must modify chemisryReader class.I found the follow codes:
Quote:
//- The type of thermo package the reader was instantiated for
typedef ThermoType thermoType;
I think I should instantiate the 'chemistryReader' with absoluteEnthalpy in a similar way as the above codes did. If you think my idea is right ,could you give advices how to modify the codes?I have tried many times ,but failed all.[ATTACH]mymakeChemistrySolverTypes.H[/ATTACH]
Attached Files
File Type: c mymakeChemistrySolverTypes.C (2.4 KB, 47 views)
zqlhzx is offline   Reply With Quote

Old   October 5, 2013, 08:22
Default my attachment
  #20
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Dear dkxls:
I send you a private message.This is my attachmentmyThermo.zip.
zqlhzx is offline   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
[Other] Multi species mass transport library [update] novyno OpenFOAM Community Contributions 111 November 9, 2021 23:37
flow solver won't recognize custom library hakonbar OpenFOAM Programming & Development 2 April 7, 2014 08:09
Compiled library vs. inInclude Files, DSMC solver crashes after run GPesch OpenFOAM Programming & Development 8 April 18, 2013 07:17
defining custom convetive terms CFD user CFX 1 February 22, 2009 22:40
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 15:49


All times are GMT -4. The time now is 06:31.