CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Cantera

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 1, 2010, 11:11
Default
  #81
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 66
Rep Power: 6
alfa_8C is an unknown quantity at this point
Hello Markus,

Your hint led my to the following strategy, which seems to be not THAT bad.

1. Comparison of alternateReactingFoam and alternateSteadyReactingFoam in order to figure out the differences related to the steady/transient stuff.

2. Taking reactingFoam as a tamplate and applying the figured out "steady stuff" from alternateSteadyReactingFoam, in order to create a solver in my case named steadyReactingFoam.

I think I was quite successful in terms of simple/piso loop and "steadystatedeltaTime" treatment. But I have still problems regarding the hsCombustionThermo and psiChemistryModel. These two models are different in alternateSolver namely: hCombustionThermo and alternateChemistryModel. Therefore it doesn't complie...
This is the compiling error:

createFields.H: In function ‘int main(int, char**)’:
createFields.H:83: error: no match for call to ‘(Foam::hsCombustionThermo) ()’
In file included from steadyReactingFoam.C:65:
chemistry.H:4: error: no match for call to ‘(Foam:siChemistryModel) ()’
chemistry.H:16: error: no match for call to ‘(Foam:siChemistryModel) ()’
chemistry.H:4: warning: unused variable ‘chemTime’
In file included from steadyReactingFoam.C:70:
YEqn.H:45: error: no match for call to ‘(Foam:siChemistryModel) ()’
In file included from steadyReactingFoam.C:71:
hsEqn.H:18: error: no match for call to ‘(Foam::hsCombustionThermo) ()’
In file included from steadyReactingFoam.C:72:
pEqn.H:43: error: ‘bound’ was not declared in this scope
pEqn.H:49: error: base operand of ‘->’ has non-pointer type ‘Foam::hsCombustionThermo’
pEqn.H:50: error: base operand of ‘->’ has non-pointer type ‘Foam::hsCombustionThermo’
pEqn.H:53: error: base operand of ‘->’ has non-pointer type ‘Foam::hsCombustionThermo’
/home/poyry/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude/readSIMPLEControls.H:6: warning: unused variable ‘momentumPredictor’
/home/poyry/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude/readSIMPLEControls.H:9: warning: unused variable ‘transonic’
make: *** [Make/linux64GccDPOpt/steadyReactingFoam.o] Error 1

Maybe you or someone else could give me a hint. If necessary I can post any file for better understanding.

Thanks a lot in advance,
Regards
Tony
alfa_8C is offline   Reply With Quote

Old   August 2, 2011, 12:46
Default
  #82
Member
 
José Rodrigues
Join Date: Jun 2010
Location: IN+/IST Lisbon
Posts: 53
Rep Power: 7
jose_rodrig is on a distinguished road
Hi

I am trying to compile a code written by an OF user, Mr. Hannes Kröger (see the post
HTML Code:
http://www.cfd-online.com/Forums/openfoam-programming-development/73210-fgm-combustion-model.html
.

I am using cantera-1.7.0-cvs and OpenFOAM-1.5.x

When I run wmake, I get an error message like this:

Code:
/home/jrodrig/OpenFOAM-1.5.x/src/LTTRostockExtensions/3rdparty/cantera-1.7.0-cvs/platforms/linux64GccDPOpt/lib/libtransport.a(LiquidTransport.o): In function `Cantera::LiquidTransport::init(Cantera::LiquidTransportParams&)':
LiquidTransport.cpp:(.text+0x4abc): undefined reference to `Cantera::Phase::molecularWeights() const'
LiquidTransport.cpp:(.text+0x4ac9): undefined reference to `Cantera::Phase::molecularWeights() const'
LiquidTransport.cpp:(.text+0x4b3a): undefined reference to `Cantera::DenseMatrix::operator=(Cantera::DenseMatrix const&)'
LiquidTransport.cpp:(.text+0x4b75): undefined reference to `Cantera::DenseMatrix::resize(int, int, double)'
which seams to be a problem of my cantera installation. Am I right?

Also, am I suposed to have a libcantera.so or libcantera.a (-lcantera) on my $CANTERA_INST_DIR/lib folder?

I would really appreciate some help at this stage since I am doing this work for my thesis and time is running low.

Regards
Jose
jose_rodrig is offline   Reply With Quote

Old   August 2, 2011, 13:08
Default
  #83
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 178
Rep Power: 8
markusrehm is on a distinguished road
Hello Jose,

are you sure you inserted all the necessary header files? Which version of Cantera are you using (1.7.0)? Maybe the code was developed with another Cantera version.

Do the Cantera demos run?
I encountered various problems with Cantera version 1.7.0. Check out the 1.8 version from the Google code page. An Install Howto together with the alternateChemistry solver can be found earlier in this thread.

Markus
markusrehm is offline   Reply With Quote

Old   August 2, 2011, 13:23
Default
  #84
Member
 
José Rodrigues
Join Date: Jun 2010
Location: IN+/IST Lisbon
Posts: 53
Rep Power: 7
jose_rodrig is on a distinguished road
Hi Markus,

The author of the code developed it with cantera-1.7.0-cvs (as fas as I know).

I ve checked the header files for the code and they are all present and linked. Also cantera compiled with no errors. However, I havent tested any demos so far. I ll do it now.

Nevertheless, from the error message posted the error message

Code:
transport.a(LiquidTransport.o): In function `Cantera::LiquidTransport::init(Cantera::LiquidTransportParams&)':
LiquidTransport.cpp:(.text+0x4abc): undefined reference to `Cantera::Phase::molecularWeights() const'
LiquidTransport.cpp:(.text+0x4ac9): undefined reference to `Cantera::Phase::molecularWeights() const'
LiquidTransport.cpp:(.text+0x4b3a): undefined reference to `Cantera::DenseMatrix::operator=(Cantera::DenseMatrix const&)'
LiquidTransport.cpp:(.text+0x4b75): undefined reference to `Cantera::DenseMatrix::resize(int, int, double)'
It seams that library $CANTERA_HOME/lib/libtranspor.a was built without those references. Am I correct? What would you say?

Regards
Jose
jose_rodrig is offline   Reply With Quote

Old   August 2, 2011, 15:45
Default
  #85
Member
 
José Rodrigues
Join Date: Jun 2010
Location: IN+/IST Lisbon
Posts: 53
Rep Power: 7
jose_rodrig is on a distinguished road
Hi

I ran a 'make test' on my build and the compiler exited with the following error:

Code:
g++ -MM -I/home/jrodrig/OpenFOAM-1.5.x/src/LTTRostockExtensions/3rdparty/cantera-1.7.0-cvs/build/include -O3 -Wall    equil_example1.cpp > equil_example1.d
In file included from equil_example1.cpp:22:
/home/jrodrig/OpenFOAM-1.5.x/src/LTTRostockExtensions/3rdparty/cantera-1.7.0-cvs/build/include/cantera/equilibrium.h:14:40: error: kernel/vcs_MultiPhaseEquil.h: No such file or directory
make[3]: *** [equil_example1.d] Error 1
make[3]: Leaving directory `/home/jrodrig/OpenFOAM-1.5.x/src/LTTRostockExtensions/3rdparty/cantera-1.7.0-cvs/examples/cxx'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/jrodrig/OpenFOAM-1.5.x/src/LTTRostockExtensions/3rdparty/cantera-1.7.0-cvs/test_problems/cxx_ex'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/jrodrig/OpenFOAM-1.5.x/src/LTTRostockExtensions/3rdparty/cantera-1.7.0-cvs/test_problems'
make: *** [test] Error 2
I went then looking for this file and I couldnt find it in the include/cantera/kernel/ dir.

I think I am not setting up correctly the preconfig file. Can you post one example?

Regards
Jose
jose_rodrig is offline   Reply With Quote

Old   August 10, 2011, 14:43
Unhappy An alternateSteadyReactingFoam error
  #86
New Member
 
xinyu
Join Date: Apr 2010
Location: Connecticut
Posts: 9
Blog Entries: 1
Rep Power: 7
xinyu is on a distinguished road
Hi everyone,

I just started using the alternateSteadyReactingFoam solver recently. I compiled the file according to http://openfoamwiki.net/index.php/Co...teReactingFoam and everything goes fine. But when I tried to run the test case (Steady/dualInlet), I got the following errors. I guess it might be a cvodes problem, but not sure...Any suggestion will be greatly appreciated.
BTW, when I run the adiabatic_Flame case, I still get the "H2 not found error". I got all my files according to the contrib links.. Is it becaus I didn't get the right files?


Thanks and regards,

Xinyu

Starting time loop

Time = 1

Solving chemistry
#0 Foam::error:rintStack(Foam::Ostream&) in "/gpfs/home/xzz105/work/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/gpfs/home/xzz105/work/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 ?? in "/gpfs/home/xzz105/work/OpenFOAM/ThirdParty/sundials/lib/libsundials_cvodes.so.2"
#4 ?? in "/gpfs/home/xzz105/work/OpenFOAM/ThirdParty/sundials/lib/libsundials_cvodes.so.2"
#5 ?? in "/gpfs/home/xzz105/work/OpenFOAM/ThirdParty/sundials/lib/libsundials_cvodes.so.2"
#6 ?? in "/gpfs/home/xzz105/work/OpenFOAM/ThirdParty/sundials/lib/libsundials_cvodes.so.2"
#7 CVode in "/gpfs/home/xzz105/work/OpenFOAM/ThirdParty/sundials/lib/libsundials_cvodes.so.2"
#8 Cantera::CVodesIntegrator::integrate(double) in "/gpfs/home/xzz105/OpenFOAM/xzz105-1.5/lib/linux64GccDPOpt/libcanteraThermosChemistry.so"
#9 CanteraZeroD::ReactorNet::advance(double) in "/gpfs/home/xzz105/OpenFOAM/xzz105-1.5/lib/linux64GccDPOpt/libcanteraThermosChemistry.so"
#10 Foam::canteraLocalTimeChemistryModel::solve(double , double) in "/gpfs/home/xzz105/OpenFOAM/xzz105-1.5/lib/linux64GccDPOpt/libcanteraThermosChemistry.so"
#11 main in "/gpfs/home/xzz105/OpenFOAM/xzz105-1.5/applications/bin/linux64GccDPOpt/alternateSteadyReactingFoam"
#12 __libc_start_main in "/lib64/libc.so.6"
#13 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/gpfs/home/xzz105/OpenFOAM/xzz105-1.5/applications/bin/linux64GccDPOpt/alternateSteadyReactingFoam"
Floating point exception
xinyu is offline   Reply With Quote

Old   August 11, 2011, 05:56
Default
  #87
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 178
Rep Power: 8
markusrehm is on a distinguished road
Hi Xinyu,

seems to be an error in the CVODES integration step. Check your composition and put it in an ideal reactor in one of the tutorial cases (e.g. in the python demos).

Markus
markusrehm is offline   Reply With Quote

Old   August 11, 2011, 21:30
Default
  #88
New Member
 
xinyu
Join Date: Apr 2010
Location: Connecticut
Posts: 9
Blog Entries: 1
Rep Power: 7
xinyu is on a distinguished road
Hi Markus,

Thanks for the suggestion. I could run all the test run in the tutorial cases in sundials. I "unset FOAM_SIGFPE" in the bashrc file and the error is gone after that. Now both the test cases and my custom case run. It is just I am not quite sure if it would introduce any error by ignoring the floating point exception....
xinyu is offline   Reply With Quote

Old   March 20, 2012, 06:40
Default
  #89
Member
 
Abhishek
Join Date: Dec 2010
Posts: 38
Rep Power: 6
Abhishekd18 is on a distinguished road
Hi,
I am trying to use the alternate chemistry model for OpenFoam. But I am getting following error.

Constructing chemical mechanism
terminate called after throwing an instance of 'std::bad_cast'
what(): std::bad_cast
Aborted (core dumped)
Abhishekd18 is offline   Reply With Quote

Old   March 20, 2012, 18:35
Default alternateReactingFoam, Cantera with 1.6, 1.7 or 2.0 ?
  #90
New Member
 
Ranjan S. Mehta
Join Date: Apr 2010
Location: Huntsville, Alabama
Posts: 6
Rep Power: 7
ranjansm is on a distinguished road
Quote:
Originally Posted by markusrehm View Post
Hello,

no up to now the library is only available for 1.5.x. An update is planned.

Regards, Markus.
Markus,

Has there been any development in upgrading the alternateReactingFoam to OF-1.7 or OF 2.1.

I started attempting it, but the chemistryModel class is now templated. I can still do it, but if some one can provide some pointers, I will speed it up.

Thanks
Ranjan
ranjansm is offline   Reply With Quote

Old   April 11, 2012, 09:24
Default
  #91
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 178
Rep Power: 8
markusrehm is on a distinguished road
Hi Ranjan,

this project is now somewhere in my backup archive

But is still on my would-be-interesting-to-do-list. I will see if I find it somewhere. Tell me if you face any problems. Maybe we get it working.

@Abhishekd: I remember a similar error. Have you put the necessary xml file for the material/reactions at the correct place?

Markus
markusrehm is offline   Reply With Quote

Old   May 28, 2012, 15:23
Default
  #92
New Member
 
Henning Bonart
Join Date: May 2012
Posts: 1
Rep Power: 0
HBon is on a distinguished road
Dear Ranjan, Markus et al.,

is someone still working on an cantera interface for OF > 2.0 ?
If so, I could probably contribute!

Henning
HBon is offline   Reply With Quote

Old   July 12, 2012, 21:08
Default equilibrate function gives Floating Point Exception
  #93
Member
 
ak
Join Date: May 2011
Posts: 71
Rep Power: 6
newOFuser is on a distinguished road
Hi

I am running cantera in OF 1.7.1, and the cantera functions work fine, except for the equilibrate function, which gives a floating point exception (eg for propane air stoichiometric mixture at 300K, 1 atm).

Has anyone else also encountered this? Any suggestions on how to get rid of it, or insights on why it may be occurring?

Thanks
ak
newOFuser is offline   Reply With Quote

Old   November 19, 2012, 14:10
Default cannot follow these steps!
  #94
New Member
 
Mhsn
Join Date: Oct 2012
Posts: 24
Rep Power: 4
mhsn is on a distinguished road
Quote:
Originally Posted by kalle View Post
Hi!

Ok, thank you, I realize that now when I check the code. I have installed sundials 2.3.0 (as 2.6 is not compatible with the cantera 1.7-cvs) which cantera was aware of during it's installation.

I'll breif what I did (maybe useful for people, either how to do or how not to do

1. Install Sundials 2.3.0 as root using ./configure CFLAGS=-fPIC... else canteraThermosChemistry didn't link. Make sure Sundials knows where to find the openmpi-stuff (or maybe run configure and make as the user with all paths set correctly, then as root run 'make install')

2. Install cantera 1.7-cvs. Check $PYTHONPATH so it can find ctml_writer.py. Run test cases that comes with Cantera.

3a. Create directory ~/OpenFOAM/OpenFOAM-1.5.x/src/thermophysicalModels/chemistryModel/alternateChemistryModels by copying from the svn

3b. In ~/OpenFOAM/OpenFOAM-1.5.x/src/thermophysicalModels/chemistryModel/alternateChemistryModels/Make/options add '-IOpenFOAM'

3c. Enter ~/OpenFOAM/OpenFOAM-1.5.x/src/thermophysicalModels/chemistryModel and run 'wmake libso alternateChemistryModels'

4a Create ~/OpenFOAM/user-1.5.x/applications/canteraThermosChemistry/ by copying from the svn

4b In ~/OpenFOAM/user-1.5.x/applications/canteraThermosChemistry/Make/options make sure that the paths to cantera, sundials, and alternateChemistryModels is correct

4c Enter ~/OpenFOAM/user-1.5.x/applications and run 'wmake libo canteraThermosChemistry'

5a Copy the two solvers from the svn to ~/OpenFOAM/user-1.5.x/applications. Make sure the Make/option file contains a valid link to ~/OpenFOAM/OpenFOAM-1.5.x/src/thermophysicalModels/chemistryModel/alternateChemistryModels/lnInclude

5b wmake both solvers.

Kalle
Hi Kalle,
I'm trying to do these steps but I'm stuck at step 3c when try wmake libso alternateChemistryModels.
Here is what I get:
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created

my file alternateChemistryModels/Make/options now looks like this:

EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-IOpenFOAM (I'm not sure if I added this line correctly and if the problem is resulted from here)

LIB_LIBS = -lfiniteVolume \
-lbasicThermophysicalModels \
-lspecie \
-lchemistryModel \
-lcombustionThermophysicalModels \
-lODE

Could you let me know what I'm missing and what I should fix?

Thanks
mhsn is offline   Reply With Quote

Old   February 28, 2013, 09:57
Default
  #95
New Member
 
tim
Join Date: Feb 2013
Posts: 1
Rep Power: 0
timla is on a distinguished road
Hi,

does anybody know if the alternateChemistryModel and the canteraThermosChemistry libraries are still available?
I tried to download them but it didn't work.

Thanks
timla is offline   Reply With Quote

Old   March 1, 2013, 07:15
Default
  #96
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by timla View Post
Hi,

does anybody know if the alternateChemistryModel and the canteraThermosChemistry libraries are still available?
I tried to download them but it didn't work.

Thanks
Available: yes. But only the version for 1.5. Later OF-versions rebuilt the chemistry system which makes it easier to plugin your own chemistry-solver (making alternateChemistryModel obsolete) and changing the way chemistry models are implemented (making canteraThermosChemistry in the current form uncompileable)

Hold on: due to the temporary shutdown of the SVN on sourceforge (for information look elsewhere) it might be possible that the SVN links don't work
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   April 10, 2013, 12:52
Default
  #97
New Member
 
Mhsn
Join Date: Oct 2012
Posts: 24
Rep Power: 4
mhsn is on a distinguished road
Quote:
Originally Posted by timla View Post
Hi,

does anybody know if the alternateChemistryModel and the canteraThermosChemistry libraries are still available?
I tried to download them but it didn't work.

Thanks
Hi, I also can't download these libraries and the corresponding solvers and tutorials. Were you able to download them?
Does anyone know where I get the files?
mhsn is offline   Reply With Quote

Old   April 10, 2013, 17:49
Default
  #98
New Member
 
Mhsn
Join Date: Oct 2012
Posts: 24
Rep Power: 4
mhsn is on a distinguished road
Quote:
Originally Posted by gschaider View Post

Hold on: due to the temporary shutdown of the SVN on sourceforge (for information look elsewhere) it might be possible that the SVN links don't work
Yes the SVN for the libraries and solvers does not work anymore.

Can someone who has the files upload them here?

Thanks
mhsn is offline   Reply With Quote

Old   August 1, 2013, 10:23
Default
  #99
TBO
Member
 
Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 4
TBO is on a distinguished road
All,

All the work posted on this forum looks very interesting. I am wanting to implement a steady state version of reacting foam for either openfoam 1.6 or openfoam 2.1.1. Does anyone have any update how to do it at the moment, since for example the svn on http://openfoamwiki.net/index.php/Contrib_alternateReactingFoam is not available.

I want to use the steady reacting foam to model the mixing of a methane jet in air (initially without chemical reactions, later on probably with reactions).

Regards,
Thijs
TBO is offline   Reply With Quote

Old   August 1, 2013, 18:54
Default
  #100
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by TBO View Post
All,

All the work posted on this forum looks very interesting. I am wanting to implement a steady state version of reacting foam for either openfoam 1.6 or openfoam 2.1.1. Does anyone have any update how to do it at the moment, since for example the svn on http://openfoamwiki.net/index.php/Contrib_alternateReactingFoam is not available.
Which SVN is not available? I tried the cantera-link and the two in section 2 ("Install ...") work too ... just not in the browser. Remove the svn:// and they will too
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:53.