CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Install/compile fireFoam 1.6-1.0 in Openfoam 2.1.1 (http://www.cfd-online.com/Forums/openfoam-programming-development/111236-install-compile-firefoam-1-6-1-0-openfoam-2-1-1-a.html)

hz283 December 31, 2012 21:20

Install/compile fireFoam 1.6-1.0 in Openfoam 2.1.1
 
Hi All,

I want to install fireFoam 1.6-1.0 in OPENFOAM 2.1.1. I download the fireFoam package through http://code.google.com/p/firefoam-dev/downloads/list. When I compiled the firefoam, I always failed to generate the libso for lDiffusioncombustionthermophysicalmodel even if I update the pathway for these include files. I am not sure if this version of fireFoam is compatible with OF 2.1.1. Does anybody know how to install and compile it in OF211:confused::confused:? I copy some error here when I complied the diffusioncombustionthermophysicalmodel:

In file included from /users/flame/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hCombustionThermo.H:38:0,
from hCombustionThermo/hCombustionThermos.C:27:
/users/flame/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude/basicPsiThermo.H: In static member function ‘static Foam::autoPtr<Foam::basicPsiThermo> Foam::basicPsiThermo::addfvMeshConstructorToTable< basicPsiThermoType>::New(const Foam::fvMesh&) [with basicPsiThermoType = Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::su therlandTransport<Foam::specieThermo<Foam::janafTh ermo<Foam::perfectGas> > > > >]’:
/users/flame/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude/basicPsiThermo.H:78:1: instantiated from ‘Foam::basicPsiThermo::addfvMeshConstructorToTab le<basicPsiThermoType>::addfvMeshConstructorToTabl e(const Foam::word&) [with basicPsiThermoType = Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::su therlandTransport<Foam::specieThermo<Foam::janafTh ermo<Foam::perfectGas> > > > >]’
hCombustionThermo/hCombustionThermos.C:55:1: instantiated from here
/users/flame/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude/basicPsiThermo.H:71:5: error: cannot allocate an object of abstract type ‘Foam::hPsiMixtureThermo<Foam::fireMixture<Foam: :sutherlandTransport<Foam::specieThermo<Foam::jana fThermo<Foam::perfectGas> > > > >’
......


best
H

wyldckat January 1, 2013 07:25

Greetings hz283,

Why are you trying to use the oldest package 1.6-1.0? The latest one is 1.7.x_0.4 and should be easier to port this version to 2.1.1!

I was going to give it a shot and try it myself, but then I stopped in case you really needed 1.6-1.0... which would be a bit strange, which is why I stopped to ask you first! ;)

Best regards,
Bruno

hz283 January 1, 2013 07:38

Hi Bruno,

Because as you know, the ft and ftvar are solved in fireFoam in the version 1.6-1.0. This is the reason why I want to choose it. For the latest versions, only the mass fraction is solved.

I really appreciate it if you can give me some help about this problem.

Happy new year.

best,
H

wyldckat January 1, 2013 09:29

Hi H,

:eek: Good thing I asked first. I wasn't aware of the different ways each solver was doing the calculations.

I gave it a shot. Here's what I found:
  1. About the compilation error you got: I also got it and it's due to the massive changes that have occurred over time.
    • Compare the file "fireFoam-1.6-1.0/source/diffusionCombustionThermophysicalModels/fireMixture/fireMixture.H" with one from 2.1.1, such as "src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H": https://github.com/OpenFOAM/OpenFOAM...ieselMixture.H
    • Also look into the .C file: https://github.com/OpenFOAM/OpenFOAM...ieselMixture.C
    • Notice that in "fireMixture.H/C" it is missing all of those virtual methods "Cp, Cv, H, Hs" and so on. You need to implement these, otherwise the compiler will keep saying that "error: cannot allocate an object of abstract type", because they are originally defined in the following file as pure virtuals: https://github.com/OpenFOAM/OpenFOAM...onentMixture.H
      In other words, pure virtuals only indicate that these methods need to be properly implemented, otherwise they are merely abstract.
  2. I didn't want to go deeper into trying to fix the missing methods, so I tried building only this old version/variant of "fireFoam". I used the following code for the file "Make/options":
    Code:

    EXE_INC = \
        -I./include \
        -I$(LIB_SRC)/finiteVolume/lnInclude \
        -I${LIB_SRC}/meshTools/lnInclude \
        -I$(LIB_SRC)/turbulenceModels \
        -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
        -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
        -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
        -I$(LIB_SRC)/combustionModels/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
        -I$(LIB_SRC)/combustionModels/lnInclude \
        -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
        -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
        -I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \
        -I$(LIB_SRC)/lagrangian/basic/lnInclude \
        -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
        -I$(LIB_SRC)/ODE/lnInclude

    EXE_LIBS = \
        -lfiniteVolume \
        -lmeshTools \
        -lcompressibleRASModels \
        -lcompressibleLESModels \
        -lspecie \
        -lbasicThermophysicalModels \
        -lsolidProperties \
        -lsolidMixtureProperties \
        -lthermophysicalFunctions \
        -lreactionThermophysicalModels \
        -lSLGThermo \
        -lchemistryModel \
        -lsolidChemistryModel \
        -lcombustionModels \
        -lregionModels \
        -lradiationModels \
        -lsurfaceFilmModels \
        -lpyrolysisModels \
        -llagrangianIntermediate \
        -lODE

    I also changed the name in "Make/files" from "fireFoam" to "fireFoam1610".
    Then ran:
    Code:

    wmake
  3. The problem is that by only building the solver, the tutorials will require some additional modifications that might lead to the calculations not being the same as they were when using the original OpenFOAM 1.6 + fireFoam-dev 1.6-1.0.

In conclusion, there are a few things you can try:
  1. You can try and fill in the missing parts into "fireMixture.H" and "fireMixture.C", based on that other "dieselMixture.H" file.
  2. Or you can try and forget those libraries and focus only on building/using the solver with that modified "options" file I posted above. Then you'll need to adapt the tutorials to use the thermodynamic models that currently exist in OpenFOAM 2.1.1, for comparing with "fireFoam" that 2.1.1 has got.
  3. Or you might want to build OpenFOAM 1.6, along with "fireFoam-dev 1.6-1.0", so you can use this as basis for comparison of results.
Best regards,
Bruno

PS: Happy 2013 :)

hz283 January 1, 2013 09:48

Quote:

Originally Posted by wyldckat (Post 399621)
Hi H,

:eek: Good thing I asked first. I wasn't aware of the different ways each solver was doing the calculations.

I gave it a shot. Here's what I found:
  1. About the compilation error you got: I also got it and it's due to the massive changes that have occurred over time.
    • Compare the file "fireFoam-1.6-1.0/source/diffusionCombustionThermophysicalModels/fireMixture/fireMixture.H" with one from 2.1.1, such as "src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H": https://github.com/OpenFOAM/OpenFOAM...ieselMixture.H
    • Also look into the .C file: https://github.com/OpenFOAM/OpenFOAM...ieselMixture.C
    • Notice that in "fireMixture.H/C" it is missing all of those virtual methods "Cp, Cv, H, Hs" and so on. You need to implement these, otherwise the compiler will keep saying that "error: cannot allocate an object of abstract type", because they are originally defined in the following file as pure virtuals: https://github.com/OpenFOAM/OpenFOAM...onentMixture.H
      In other words, pure virtuals only indicate that these methods need to be properly implemented, otherwise they are merely abstract.
  2. I didn't want to go deeper into trying to fix the missing methods, so I tried building only this old version/variant of "fireFoam". I used the following code for the file "Make/options":
    Code:

    EXE_INC = \
        -I./include \
        -I$(LIB_SRC)/finiteVolume/lnInclude \
        -I${LIB_SRC}/meshTools/lnInclude \
        -I$(LIB_SRC)/turbulenceModels \
        -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
        -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
        -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
        -I$(LIB_SRC)/combustionModels/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
        -I$(LIB_SRC)/combustionModels/lnInclude \
        -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
        -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
        -I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \
        -I$(LIB_SRC)/lagrangian/basic/lnInclude \
        -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
        -I$(LIB_SRC)/ODE/lnInclude

    EXE_LIBS = \
        -lfiniteVolume \
        -lmeshTools \
        -lcompressibleRASModels \
        -lcompressibleLESModels \
        -lspecie \
        -lbasicThermophysicalModels \
        -lsolidProperties \
        -lsolidMixtureProperties \
        -lthermophysicalFunctions \
        -lreactionThermophysicalModels \
        -lSLGThermo \
        -lchemistryModel \
        -lsolidChemistryModel \
        -lcombustionModels \
        -lregionModels \
        -lradiationModels \
        -lsurfaceFilmModels \
        -lpyrolysisModels \
        -llagrangianIntermediate \
        -lODE

    I also changed the name in "Make/files" from "fireFoam" to "fireFoam1610".
    Then ran:
    Code:

    wmake
  3. The problem is that by only building the solver, the tutorials will require some additional modifications that might lead to the calculations not being the same as they were when using the original OpenFOAM 1.6 + fireFoam-dev 1.6-1.0.

In conclusion, there are a few things you can try:
  1. You can try and fill in the missing parts into "fireMixture.H" and "fireMixture.C", based on that other "dieselMixture.H" file.
  2. Or you can try and forget those libraries and focus only on building/using the solver with that modified "options" file I posted above. Then you'll need to adapt the tutorials to use the thermodynamic models that currently exist in OpenFOAM 2.1.1, for comparing with "fireFoam" that 2.1.1 has got.
  3. Or you might want to build OpenFOAM 1.6, along with "fireFoam-dev 1.6-1.0", so you can use this as basis for comparison of results.
Best regards,
Bruno

PS: Happy 2013 :)

Hi Bruno,

Thank you very much for your great help. I will have a try based on your suggestions. Can I ask you another question about the compilation of OF:

Yesterday I tried to re-compiled the OF211 from source on the parallel machine, however I always failed and got the error massege:

/usr/bin/ld: cannot find -l********
collect2: ld returned 1 exit status


It seems that this is a common problem bacause there are many posts on this forum. I read many and try to solve this problem but I failed. Actually, although many gave their suggestions, however their methods do not work for my case. Do you know what is root cause for this?

This process is like this:

OF 211 has already be intalled on the same machine with the same complier. I want to re-recomplied it, but when I did it, that error happens. I tried versions, like OF 170, the same error also exist. The procedure I did is: decompress the OF and Thirdparty package; add the lines and source $HOME/.bashrc; compiling not successfully.

Thank you very much.
best,
H



wyldckat January 1, 2013 10:09

Hi H,

Quote:

Originally Posted by hz283 (Post 399626)
Yesterday I tried to re-compiled the OF211 from source on the parallel machine, however I always failed and got the error massege:

/usr/bin/ld: cannot find -l********
collect2: ld returned 1 exit status

42 comes to mind ;) In the sense that you're asking very broad question, to which a point of reference seems to be missing... therefore, any answer could be right or wrong, all depending on the point of reference :D.

Therefore, lets find a few points of reference:
  1. "cannot find -l****" means that the library "****" (actual name would be "lib****.so" on Linux) was not found in the provided library search path. This probably means that said library was either not built properly as well or that the path for that library was not provided.
    Such an example is in the "firefoam 1.6-1.0" "Make/options": http://code.google.com/p/firefoam-de...ke/options?r=3
    Notice the lines with "-L$(FOAM_USER_LIBBIN)"? That tells wmake to look in that folder for the libraries next to it.
  2. On the "parallel machine" you've written about, is there still any other installation of OpenFOAM? If so, read this: Advanced tips for working with the OpenFOAM shell environment
    The explanation is simple: if the OpenFOAM shell environment is set to 1.7.0 and then you try to activate 2.1.1 on top of it, things will be half-broken, therefore leading to libraries not being found...
    Either way, knowing a bit more about what specific steps you've taken, will make it easier to understand how you got there ;)
  3. Once you're mastered how the shell environment works and have successfully built OpenFOAM, try reproducing the following tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
Best regards,
Bruno

hz283 January 1, 2013 10:24

Quote:

Originally Posted by wyldckat (Post 399630)
Hi H,


42 comes to mind ;) In the sense that you're asking very broad question, to which a point of reference seems to be missing... therefore, any answer could be right or wrong, all depending on the point of reference :D.

Therefore, lets find a few points of reference:
  1. "cannot find -l****" means that the library "****" (actual name would be "lib****.so" on Linux) was not found in the provided library search path. This probably means that said library was either not built properly as well or that the path for that library was not provided.
    Such an example is in the "firefoam 1.6-1.0" "Make/options": http://code.google.com/p/firefoam-de...ke/options?r=3
    Notice the lines with "-L$(FOAM_USER_LIBBIN)"? That tells wmake to look in that folder for the libraries next to it.
  2. On the "parallel machine" you've written about, is there still any other installation of OpenFOAM? If so, read this: Advanced tips for working with the OpenFOAM shell environment
    The explanation is simple: if the OpenFOAM shell environment is set to 1.7.0 and then you try to activate 2.1.1 on top of it, things will be half-broken, therefore leading to libraries not being found...
    Either way, knowing a bit more about what specific steps you've taken, will make it easier to understand how you got there ;)
  3. Once you're mastered how the shell environment works and have successfully built OpenFOAM, try reproducing the following tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
Best regards,
Bruno

Hi Bruno,

Thank you for your help. Reply to the second point you mentioned:
The initial thing is the OF 211 is there, and I would like to intall OF170 because I would like to check if fireFoam 1610 is compatible with OF170. When the OF170 is compiling, I found that the original OF211 cannot work, and at the same time I found that OF170 did not either. So I am completely frustrated. Such a bad thing at the beginning of 2013! So I would like to re-compiled the OF211 after all OF211 is good thing. However, I found that I cannot return the original point again even if I make a new fold Openfoam, download these packages, source .bashrc, ./allewmake, but finally the error mentioned in the last threads came out. This is the whole story. I am just curious about why it still work even if I do these thing from scratch.

Thank you very much.
H

wyldckat January 1, 2013 10:41

Hi H,

Well, then the blog post on #2 should indeed help you. In a nutshell:
  1. Edit the file ".bashrc" and remove anything you have that is related to OpenFOAM. Then add these two lines:
    Code:

    alias of170='. $HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc'
    alias of211='. $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc'

    Save and close the file.
  2. Start a new terminal window/tab. Always start a new terminal when you want to use another version of OpenFOAM.
  3. According to the version you now want, activate the respective environment; e.g. for 1.7.0 you should run:
    Code:

    of170
    This will activate the environment for 1.7.0 and you're ready to use it!
By the way, for "fireFoam-dev 1.6-1.0" to work on OpenFOAM 1.7.0, you might need the modifications that are shown here: http://code.google.com/p/firefoam-dev/source/detail?r=4

Best regards,
Bruno

hz283 January 1, 2013 10:52

Quote:

Originally Posted by wyldckat (Post 399637)
Hi H,

Well, then the blog post on #2 should indeed help you. In a nutshell:
  1. Edit the file ".bashrc" and remove anything you have that is related to OpenFOAM. Then add these two lines:
    Code:

    alias of170='. $HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc' alias of211='. $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc'
    Save and close the file.
  2. Start a new terminal window/tab. Always start a new terminal when you want to use another version of OpenFOAM.
  3. According to the version you now want, activate the respective environment; e.g. for 1.7.0 you should run:
    Code:

    of170
    This will activate the environment for 1.7.0 and you're ready to use it!
By the way, for "fireFoam-dev 1.6-1.0" to work on OpenFOAM 1.7.0, you might need the modifications that are shown here: http://code.google.com/p/firefoam-dev/source/detail?r=4

Best regards,
Bruno

Hi Bruno,

I read the very good things in your blog about installing multiply versions of OF. Now for my choice, I think I can retain OF211, and install OF170 and then install fireFoam 1610 into OF170. Or even directly I only OF170. In fact I only want to one solver in the openfoam package. Is FIREFOAM 1610 fully compatible with OF170 except the modification you mentioned in the last threads? Thank you very much for your very nice help.

best regards,
H

wyldckat January 1, 2013 13:56

Hi H,

I did a quick test with OpenFOAM 1.7.0 on a virtual machine with Ubuntu 10.04 i686 and I had to do the following modifications to the source code:
  1. Edit "source/Make/files" and change:
    Code:

    EXE = $(FOAM_USER_APPBIN)/fireFoam
    to this:
    Code:

    EXE = $(FOAM_USER_APPBIN)/fireFoam1610
  2. Do the modifications that are listed here: http://code.google.com/p/firefoam-dev/source/detail?r=4 - click on the link that says "expand all" to see all of the necessary changes.
And the rest should work as intended, as far as I can understand.

Best regards,
Bruno

hz283 January 1, 2013 14:01

Quote:

Originally Posted by wyldckat (Post 399653)
Hi H,

I did a quick test with OpenFOAM 1.7.0 on a virtual machine with Ubuntu 10.04 i686 and I had to do the following modifications to the source code:
  1. Edit "source/Make/files" and change:
    Code:

    EXE = $(FOAM_USER_APPBIN)/fireFoam
    to this:
    Code:

    EXE = $(FOAM_USER_APPBIN)/fireFoam1610
  2. Do the modifications that are listed here: http://code.google.com/p/firefoam-dev/source/detail?r=4 - click on the link that says "expand all" to see all of the necessary changes.
And the rest should work as intended, as far as I can understand.

Best regards,
Bruno

Hi Bruno,

Thank you very much. I will try and give you the feedback. Now I am still stuck with the problem about:
/usr/bin/ld: cannot find -l********
collect2: ld returned 1 exit status


I am still trying to solve this problem. Thank you very much.

best regards,
H


wyldckat January 1, 2013 14:15

Hi H,

If you're having problems building either one of the OpenFOAM versions, create a new thread here: http://www.cfd-online.com/Forums/openfoam-installation/
And be sure to give enough details about the Linux Distribution and architecture you're using and what installation instructions you're following!

Best regards,
Bruno

hz283 January 1, 2013 15:36

Hi Bruno,

Thank you very much fo your help. Can I ask you other several questions about fireFoam-1.6-1.0:

1, in createFields.H, the line
basicMultiComponentMixture& composition = thermo.composition();
Actually in hCombustionthermo, the composition function is a virtual function, and this function are defined in the derived classes. Here, how the code can know which derived class is used? I am new in C++ and openfoam. sorry for this simple question.

2, As you know, in the fireFoam 1.6-1.0, the file hCombustionthermo.C exists. What is the role of this file? How does the code use makeCombustionThermo defined in this file? I read thouroughly the source code files in the firefoam-1.6-1.0 folder but did not figure it out.

Thank you very much for your help.
best regards,
H

hz283 January 1, 2013 16:10

Hi Bruno,

I have already installed the fireFoam 1.6-1.0 into OF170 successfully. Thank you very much for your help!

best regards,
H

wyldckat January 1, 2013 16:21

Hi H,

Quote:

Originally Posted by hz283 (Post 399660)
1, in createFields.H, the line
basicMultiComponentMixture& composition = thermo.composition();
Actually in hCombustionthermo, the composition function is a virtual function, and this function are defined in the derived classes. Here, how the code can know which derived class is used? I am new in C++ and openfoam. sorry for this simple question.

"virtual" methods are methods that can be overridden by classes that are derived from that class. For more information: http://www.cplusplus.com/doc/tutorial/polymorphism/

Quote:

Originally Posted by hz283 (Post 399660)
2, As you know, in the fireFoam 1.6-1.0, the file hCombustionthermo.C exists. What is the role of this file? How does the code use makeCombustionThermo defined in this file? I read thouroughly the source code files in the firefoam-1.6-1.0 folder but did not figure it out.

https://github.com/OpenFOAM/OpenFOAM...ustionThermo.H <- that's what "makeCombustionThermo" looks like :D
It's basically an automatic code generation macro that does all of the actual class creation and a whole set of bureaucratic definitions. In other words, it creates all of the necessary classes and associations necessary for adding this new model to the list of existing CombustionThermo models.

The problem is that in 2.1, there are a lot of pure virtual methods: https://github.com/OpenFOAM/OpenFOAM...onentMixture.H
But in 1.6, these pure virtual methods didn't exist: http://repo.or.cz/w/OpenFOAM-1.6.x.g...onentMixture.H
This is why these methods need to be (re)implemented. And this is why I pointed you to the example of "dieselMixture" ;).

Best regards,
Bruno

hz283 January 2, 2013 10:21

Hi Bruno,

When I use the same package of OF170 to compile on another computer, and the messege as follows appears:

/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status
make: *** [/users/flame/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/librandomProcesses.so] Error 1


Do you know what is the reason? This directly makes me fail to install OF170. I really appreciate it if you can give me some suggestions about it.

best regards,
H

wyldckat January 2, 2013 11:35

Hi H,

Like I wrote before, please start a new thread here: http://www.cfd-online.com/Forums/openfoam-installation/
And please provide details on it what Linux Distribution version and architecture you're using, as well as which installation instructions you're following.
As for the errors you might get, run Allwmake like this:
Code:

./Allwmake > make.log 2>&1
Then look into the file "make.log" and find the first errors, because those are the ones that matter the most!

I'll have a look into it later today.

Best regards,
Bruno

hz283 January 2, 2013 15:06

Hi Bruno,

Thank you very much. I am installing OF211, and this version is Ok till now although the compiling process is not complete now. After finishing this I wll install OF170 tomorrow.

Thank you again for your great help!
best
H

hz283 March 28, 2013 08:03

Dear Bruno,

These days I tried to complied the fireFoam-1.6.0 in the package of OF211. I follow your suggestion and use the options you posted in the last thread:

Or you can try and forget those libraries and focus only on building/using the solver with that modified "options" file I posted above. Then you'll need to adapt the tutorials to use the thermodynamic models that currently exist in OpenFOAM 2.1.1, for comparing with "fireFoam" that 2.1.1 has got.

I found that fireFoam.o and libpatchFields.so can be generated. However, the hCombustionThermos.o failed. The error is like this:

+ wmake libso diffusionCombustionThermophysicalModels
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file hCombustionThermo/hCombustionThermos.C
SOURCE=hCombustionThermo/hCombustionThermos.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/specie/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/hCombustionThermos.o
In file included from /home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hCombustionThermo.H:38:0,
from hCombustionThermo/hCombustionThermos.C:27:
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude/basicPsiThermo.H: In static member function ‘static Foam::autoPtr<Foam::basicPsiThermo> Foam::basicPsiThermo::addfvMeshConstructorToTable< basicPsiThermoType>::New(const Foam::fvMesh&) [with basicPsiThermoType = Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::su therlandTransport<Foam::specieThermo<Foam::janafTh ermo<Foam::perfectGas> > > > >]’:
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude/basicPsiThermo.H:78:1: instantiated from ‘Foam::basicPsiThermo::addfvMeshConstructorToTable <basicPsiThermoType>::addfvMeshConstructorToTable( const Foam::word&) [with basicPsiThermoType = Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::su therlandTransport<Foam::specieThermo<Foam::janafTh ermo<Foam::perfectGas> > > > >]’
hCombustionThermo/hCombustionThermos.C:55:1: instantiated from here
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude/basicPsiThermo.H:71:5: error: cannot allocate an object of abstract type ‘Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::s utherlandTransport<Foam::specieThermo<Foam::janafT hermo<FoamerfectGas> > > > >’
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hPsiMixtureThermo.H:54:1: note: because the following virtual functions are pure within ‘Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::s utherlandTransport<Foam::specieThermo<Foam::janafT hermo<FoamerfectGas> > > > >’:
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:125:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::nMoles(Foam::lab el) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:128:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::W(Foam::label) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:134:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::Cp(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:137:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::Cv(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:140:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::H(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:143:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::Hs(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:146:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::Hc(Foam::label) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:149:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::S(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:152:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::E(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:155:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::G(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:158:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::A(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:164:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::mu(Foam::label, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:167:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::kappa(Foam::labe l, Foam::scalar) const
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/basicMultiComponentMixture.H:170:28: note: virtual Foam::scalar Foam::basicMultiComponentMixture::alpha(Foam::labe l, Foam::scalar) const
In file included from hCombustionThermo/hCombustionThermos.C:27:0:
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hCombustionThermo.H: In static member function ‘static Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::addfvMeshConstructorToTab le<hCombustionThermoType>::New(const Foam::fvMesh&) [with hCombustionThermoType = Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::su therlandTransport<Foam::specieThermo<Foam::janafTh ermo<Foam:erfectGas> > > > >]’:
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hCombustionThermo.H:79:1: instantiated from ‘Foam::hCombustionThermo::addfvMeshConstructorToTa ble<hCombustionThermoType>::addfvMeshConstructorTo Table(const Foam::word&) [with hCombustionThermoType = Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::su therlandTransport<Foam::specieThermo<Foam::janafTh ermo<Foam:erfectGas> > > > >]’
hCombustionThermo/hCombustionThermos.C:55:1: instantiated from here
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hCombustionThermo.H:72:5: error: cannot allocate an object of abstract type ‘Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::s utherlandTransport<Foam::specieThermo<Foam::janafT hermo<Foam:erfectGas> > > > >’
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hPsiMixtureThermo.H:54:1: note: since type ‘Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::s utherlandTransport<Foam::specieThermo<Foam::janafT hermo<Foam:erfectGas> > > > >’ has pure virtual functions
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude/basicPsiThermo.H: In static member function ‘static Foam::autoPtr<Foam::basicPsiThermo> Foam::basicPsiThermo::addfvMeshConstructorToTable< basicPsiThermoType>::New(const Foam::fvMesh&) [with basicPsiThermoType = Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::su therlandTransport<Foam::specieThermo<Foam::janafTh ermo<Foam:erfectGas> > > > >]’:
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude/basicPsiThermo.H:71:5: warning: control reaches end of non-void function
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hCombustionThermo.H: In static member function ‘static Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::addfvMeshConstructorToTab le<hCombustionThermoType>::New(const Foam::fvMesh&) [with hCombustionThermoType = Foam::hPsiMixtureThermo<Foam::fireMixture<Foam::su therlandTransport<Foam::specieThermo<Foam::janafTh ermo<Foam::perfectGas> > > > >]’:
/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude/hCombustionThermo.H:72:5: warning: control reaches end of non-void function
make: *** [Make/linux64GccDPOpt/hCombustionThermos.o] Error 1


These errors seem from the virtual class. I compared the the files basicPsiThermo.H from OF170 and OF211 (fireFoam160 can be cmplied in OF170 successfully.) but I did not find any difference between them. Could you please give me some suggestions about this? Thank you in advance!

best,
H.

//************************************************** ************************************************** ************************************************** ***//
Update:

When I modify some change, it seems that I can compiled the code in OF211 successfully. The output information is like this:
+ wmake libso diffusionCombustionThermophysicalModels
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file hCombustionThermo/hCombustionThermos.C
SOURCE=hCombustionThermo/hCombustionThermos.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/basic/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/specie/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/hz283/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/hCombustionThermos.o
'/home/hz283/OpenFOAM/hz283-2.1.1/platforms/linux64GccDPOpt/lib/libdiffusionCombustionThermophysicalModels.so' is up to date.


However, when I run this version of fireFoam,

it seems that the fireMixure model is not corectly called:

--> FOAM FATAL ERROR:
Unknown hCombustionThermo type hPsiMixtureThermo<fireMixture<sutherlandTransport< specieThermo<janafThermo<perfectGas>>>>>

Valid hCombustionThermo types are:

15
(
hPsiMixtureThermo<dieselMixture<sutherlandTranspor t<specieThermo<janafThermo<perfectGas>>>>>
hPsiMixtureThermo<homogeneousMixture<constTranspor t<specieThermo<hConstThermo<perfectGas>>>>>
hPsiMixtureThermo<homogeneousMixture<sutherlandTra nsport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiMixtureThermo<homogeneousMixture<sutherlandTra nsport<specieThermo<janafThermo<perfectGas>>>>>
hPsiMixtureThermo<inhomogeneousMixture<constTransp ort<specieThermo<hConstThermo<perfectGas>>>>>
hPsiMixtureThermo<inhomogeneousMixture<sutherlandT ransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiMixtureThermo<inhomogeneousMixture<sutherlandT ransport<specieThermo<janafThermo<perfectGas>>>>>
hPsiMixtureThermo<multiComponentMixture<constGasTh ermoPhysics>>
hPsiMixtureThermo<multiComponentMixture<gasThermoP hysics>>
hPsiMixtureThermo<reactingMixture<constGasThermoPh ysics>>
hPsiMixtureThermo<reactingMixture<gasThermoPhysics >>
hPsiMixtureThermo<singleStepReactingMixture<gasThe rmoPhysics>>
hPsiMixtureThermo<veryInhomogeneousMixture<constTr ansport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiMixtureThermo<veryInhomogeneousMixture<sutherl andTransport<specieThermo<hConstThermo<perfectGas> >>>>
hPsiMixtureThermo<veryInhomogeneousMixture<sutherl andTransport<specieThermo<janafThermo<perfectGas>> >>>
)



From function hCombustionThermo::New(const fvMesh&)
in file combustionThermo/hCombustionThermo/hCombustionThermoNew.C at line 61.

FOAM exiting


Do you know what is the reason about this? I really appreciate it if you can give me some hints.

best
H.
Quote:

Originally Posted by wyldckat (Post 399621)
Hi H,

:eek: Good thing I asked first. I wasn't aware of the different ways each solver was doing the calculations.

I gave it a shot. Here's what I found:
  1. About the compilation error you got: I also got it and it's due to the massive changes that have occurred over time.
    • Compare the file "fireFoam-1.6-1.0/source/diffusionCombustionThermophysicalModels/fireMixture/fireMixture.H" with one from 2.1.1, such as "src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H": https://github.com/OpenFOAM/OpenFOAM...ieselMixture.H
    • Also look into the .C file: https://github.com/OpenFOAM/OpenFOAM...ieselMixture.C
    • Notice that in "fireMixture.H/C" it is missing all of those virtual methods "Cp, Cv, H, Hs" and so on. You need to implement these, otherwise the compiler will keep saying that "error: cannot allocate an object of abstract type", because they are originally defined in the following file as pure virtuals: https://github.com/OpenFOAM/OpenFOAM...onentMixture.H
      In other words, pure virtuals only indicate that these methods need to be properly implemented, otherwise they are merely abstract.
  2. I didn't want to go deeper into trying to fix the missing methods, so I tried building only this old version/variant of "fireFoam". I used the following code for the file "Make/options":
    Code:

    EXE_INC = \
        -I./include \
        -I$(LIB_SRC)/finiteVolume/lnInclude \
        -I${LIB_SRC}/meshTools/lnInclude \
        -I$(LIB_SRC)/turbulenceModels \
        -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
        -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
        -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
        -I$(LIB_SRC)/combustionModels/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
        -I$(LIB_SRC)/combustionModels/lnInclude \
        -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
        -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
        -I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \
        -I$(LIB_SRC)/lagrangian/basic/lnInclude \
        -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
        -I$(LIB_SRC)/ODE/lnInclude

    EXE_LIBS = \
        -lfiniteVolume \
        -lmeshTools \
        -lcompressibleRASModels \
        -lcompressibleLESModels \
        -lspecie \
        -lbasicThermophysicalModels \
        -lsolidProperties \
        -lsolidMixtureProperties \
        -lthermophysicalFunctions \
        -lreactionThermophysicalModels \
        -lSLGThermo \
        -lchemistryModel \
        -lsolidChemistryModel \
        -lcombustionModels \
        -lregionModels \
        -lradiationModels \
        -lsurfaceFilmModels \
        -lpyrolysisModels \
        -llagrangianIntermediate \
        -lODE

    I also changed the name in "Make/files" from "fireFoam" to "fireFoam1610".
    Then ran:
    Code:

    wmake
  3. The problem is that by only building the solver, the tutorials will require some additional modifications that might lead to the calculations not being the same as they were when using the original OpenFOAM 1.6 + fireFoam-dev 1.6-1.0.

In conclusion, there are a few things you can try:
  1. You can try and fill in the missing parts into "fireMixture.H" and "fireMixture.C", based on that other "dieselMixture.H" file.
  2. Or you can try and forget those libraries and focus only on building/using the solver with that modified "options" file I posted above. Then you'll need to adapt the tutorials to use the thermodynamic models that currently exist in OpenFOAM 2.1.1, for comparing with "fireFoam" that 2.1.1 has got.
  3. Or you might want to build OpenFOAM 1.6, along with "fireFoam-dev 1.6-1.0", so you can use this as basis for comparison of results.
Best regards,
Bruno

PS: Happy 2013 :)


wyldckat April 1, 2013 08:35

Hi hz283,

Edit the "system/controlDict" file in your case and add this line to it:
Code:

libs ("libdiffusionCombustionThermophysicalModels.so");
This will force the library to be loaded when running in your case folder.

The other possibility is to add the following to the "Make/options" file in your "fireFoam" solver:
Code:

-ldiffusionCombustionThermophysicalModels
For example, change this block:
Code:

EXE_LIBS = \
    -lfiniteVolume \
    -lmeshTools \
    -lcompressibleRASModels \
    -lcompressibleLESModels \
    -lspecie \
    -lbasicThermophysicalModels \
    -lsolidProperties \
    -lsolidMixtureProperties \
    -lthermophysicalFunctions \
    -lreactionThermophysicalModels \
    -lSLGThermo \
    -lchemistryModel \
    -lsolidChemistryModel \
    -lcombustionModels \
    -lregionModels \
    -lradiationModels \
    -lsurfaceFilmModels \
    -lpyrolysisModels \
    -llagrangianIntermediate \
    -lODE

To:
Code:

EXE_LIBS = \
    -lfiniteVolume \
    -lmeshTools \
    -lcompressibleRASModels \
    -lcompressibleLESModels \
    -lspecie \
    -lbasicThermophysicalModels \
    -lsolidProperties \
    -lsolidMixtureProperties \
    -lthermophysicalFunctions \
    -lreactionThermophysicalModels \
    -lSLGThermo \
    -lchemistryModel \
    -lsolidChemistryModel \
    -lcombustionModels \
    -lregionModels \
    -lradiationModels \
    -lsurfaceFilmModels \
    -lpyrolysisModels \
    -llagrangianIntermediate \
    -ldiffusionCombustionThermophysicalModels \
    -lODE

Best regards,
Bruno


All times are GMT -4. The time now is 16:58.