Quote:
Bernhard |
Quote:
thanks a lot! actually I need to access to the H[i] (enthalpy of each species )... is there another way to call them? Silvano |
Sensible Enthalpy
Hi Everybody
I have the same problem, I want to have access to sensible enthalpy of mixture, and the chemical energy source term in Cantera. How can I do that? |
Questions about Cantera
Hi everyone,
I'm researching in the field of swirl burners and have some experiences simulating combustion with CFX. Unfortunately I fell in love with OF. Due to the instructions I've installed the cantera-interface and now I ready to go. So here are my questions, which are probably easy to answer for you experts: 1. How is the coupling between OF and Cantera done. I mean is OF calculating the transport of each species and cantera calculates the reaction rates. Is this done via a source term? I just want to understand how the programs work. 2. Is the cantera thing able to simulate a premixed case (Methane/Air) 3. Is there an introduction on how to set an OF case with comubustion and cantera up? Something like a step-by-step. The provided tutorials are not commented. If someone can give me hint on the setup I would write it down for everyone. Regards, Olli |
Hello Sahm and Silvano,
sorry for letting you wait for so long. Here a possible solution to your problem: Quote:
Code:
gas.gas().getMassFractions(y1.begin()) Code:
rhomean = gas.gas().density() Code:
getEnthalpy_RT() See the Cantera Header files for more information (in CANTERA_INSTALLATION/include/cantera/kernel/). As long as you need the data only within that function and calculate the source terms there it won't be difficult. But if you want it in the hEqn of the solver the problems Bernhard mentioned will occur. I hope that helps. Regards, Markus. |
Hello Olli,
thanks for your interest in the code. I hope to be able to help a bit further. Quote:
2) It depends on the combustion model. Cantera is only used as database and to integrate the chemistry. For the combustion model you have to see if the available models fit. 3.) The solver is based on reactingFoam. So try to understand this one and then see what are the differences to the new one. Reactingfoam is for example explained here: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2007/AndreasLundstrom/reactingFoam.pdf Additionally I recommend you to have a look at the Cantera tutorials and test cases. If there are more things you do not understand feel free to ask. Bye, Markus. |
Quote:
actually I would like modify the hEqn adding the the term: sum{div[h(i)*(muEff-alphaEff)]gradY(i)} that you get considering all Sc=1 in stead have unity Lewis Number. So for ReactingFoam I use the following hEqn: Code:
{ Code:
volScalarField energySource I would be very grateful if you could help me with this issue... Thanks, Silvano |
Hi Markus,
thank you for your answers. I will start with understanding reactingFoam and than continue to cantera. So be prepared for more questions;-) Thanks, Olli |
Hi Markus and Bernhard
This was the last error I got when trying to install canterathermochemistry /usr/bin/ld: /usr/local/lib/libsundials_cvodes.a(cvodes.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libsundials_cvodes.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [/home/sahm/OpenFOAM/sahm-1.5-dev/lib/linux64GccDPOpt/libcanteraThermosChemistry.so] Error 1 As far as I know, installation of sundials was done with -fPIC, so I don't what to do with this final error. Should I run wmake with this key? Still there's a chance that I have defined the addresses wrong. I would really appreciate if any one could help me with this. |
Quote:
Bernhard |
Please double-check your sundials-compilation. I'm pretty sure that things are like ld reports them (that not everything was compiled with -fPIC). Especially check that ALL compilers that are used to compile it use that switch (one .o-file that is non-PICt taints the whole library)
Bernhard[/QUOTE] Thanks bernhard, but I have a question, I was trying to wmake the canterachemistrythermo, one by one, and I just removed the -l libraries inside the Make/options file, then tried to wmake it, and it compiled, I have no Idea what they were for, or what will happen next as I have not used it with any solver yet. Could you tell me what those libraries are for ? or where they're being used. SAHM. |
Quote:
I was trying to wmake the canterachemistrythermo, one by one, and I just removed the -l libraries inside the Make/options file, then tried to wmake it, and it compiled, I have no Idea what they were for, or what will happen next as I have not used it with any solver yet. Could you tell me what those libraries are for ? or where they're being used. SAHM.[/QUOTE] Would have to look at the sources myself. Try running the solver. If the dynamic linker doesn't throw an error about missing references everything is fine Bernhard |
Quote:
Selecting thermodynamics package hMixtureThermo<canteraMixture> Unknown hCombustionThermo type hMixtureThermo<canteraMixture> Valid hCombustionThermo types are : 9 ( hMixtureThermo<multiComponentMixture<sutherlandTra nsport<specieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<dieselMixture<sutherlandTransport<s pecieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<veryInhomogeneousMixture<sutherland Transport<specieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<inhomogeneousMixture<sutherlandTran sport<specieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<homogeneousMixture<sutherlandTransp ort<specieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<veryInhomogeneousMixture<constTrans port<specieThermo<hConstThermo<perfectGas>>>>> hMixtureThermo<inhomogeneousMixture<constTransport <specieThermo<hConstThermo<perfectGas>>>>> hMixtureThermo<homogeneousMixture<constTransport<s pecieThermo<hConstThermo<perfectGas>>>>> hMixtureThermo<reactingMixture> ) From function hCombustionThermo::New(const fvMesh&) in file hCombustionThermo/newhCombustionThermo.C at line 68. FOAM exiting. So, what should I do with those libraries. How can I make sure that I have installed them correctly and I have linked the canteraThermochemistry correctly. Thanks for your help. |
Quote:
Make sure that a) you load the Cantera-library via libs in controlDict b) if you do: check whether there is a warning/error about not being able to load it further up in the log-file (it is usually a good idea to look for the first sign of trouble) If you do a) and b) gives no problem then hMixtureThermo<canteraMixture> should be part of that list (or you get no error at all) Bernhard |
log files.
1 Attachment(s)
Quote:
Apparently I have included the Cantera library in my control dict file, and I don't get any other error message. I have attached my log files. insta7 is the log file for installing cantera library, and log.txt is the error I get when I try to run alternateReactingFoam. Thanks for your time. |
new error
1 Attachment(s)
Bernhard
Is this the error you were talking about? |
Quote:
Code:
alternateReactingFoam: symbol lookup error: /home/sahm/OpenFOAM/sahm-1.5-dev/lib/linux64GccDPOpt/libcanteraThermosChemistry.so: undefined symbol: dgemv_ Bernhard |
Cantera Installation (support pacakges)
Hi foamers,
I am interested in using Cantera along with OpenFoam. I found information at wiki http://openfoamwiki.net/index.php/Co...teReactingFoam . The question I have is probably very basic. Can I install and download BLAS, LAPACK, numpy and gfortran in the third party directory, just as I download cantera and sundials in the third party. I am not very familiar with UNIX oeprations and hence asking this question. Will this package work with OpenFOAM1.6 version? Thanks, Nir |
Quote:
|
warning cantera /opt opt /opt/
just an general advise:
do NOT install cantera in /opt/ !!!!!!!!!!!!!!!!! guess what...I did...just finished reinstalling the system.. it screws up your kernel :mad: !! |
All times are GMT -4. The time now is 10:11. |