btuznik / porousGasificationFoam

Solver for reacting flow through porous media. foam-extend-4.1 equivalent at https://github.com/pjzuk/porousGasificationFoam. Submitted to Computer Physics Communications
15 stars 10 forks source link

Installation Issue #1

Closed theomlara closed 3 years ago

theomlara commented 3 years ago

I face two fatal issues when trying to install the version for OpenFOAM 8. The installation for the foam-extended version worked fine, do you have any idea why I am facing these? Thanks

In file included from pyrolysisModel/volPyrolysis/volPyrolysis.C:27: pyrolysisModel/volPyrolysis/volPyrolysis.H:40:10: fatal error: BasicSolidChemistryModel.H: No such file or directory 40 | #include "BasicSolidChemistryModel.H"

porousGasificationFoam.C:50:10: fatal error: BasicSolidChemistryModel.H: No such file or directory 50 | #include "BasicSolidChemistryModel.H"

btuznik commented 3 years ago

Can you provide some additional information: steps you took in order to install the solver, what OS do you run, did you source necessary environmental paths?

I've just compiled the solver on a fresh Ubuntu install and I haven't encountered any problems.

theomlara commented 3 years ago

Hi, thanks for the quick answer. I tried to install in Ubuntu 20.04.2 LTS. The steps that I took are:

btuznik commented 3 years ago

Could you please try to download a fresh copy of the repository? Try the following steps:

  1. Open new terminal and type:
  2. $ git clone https://github.com/btuznik/porousGasificationFoam.git
  3. $ cd porousGasificationFoam/
  4. [Edit] $ source /opt/openfoam8/etc/bashrc
  5. $ source porousGasificationMediaDirectories
  6. $ ./Allwclean
  7. $ ./Allwmake

If that won't work I will try to compile the code on exactly the same version of the Ubuntu that you use.

theomlara commented 3 years ago

It worked (Ubuntu 20.04.2 LTS), thank you.

ahmadibrahim964 commented 2 years ago

When compiling this solver on OpenFOAM v8 I face numerous errors. I am using MacOS Mojave version 10.14.6 (2017). I will talk you through my procedure of compiling the solver:

  1. I download porousGasificationFoam-master and copied the folder to my working space.
  2. I open a terminal and launch openfoam v8 using openfoam8-macos.
  3. I navigate to my RUN folder (folder which contains porousGasificationFoam-master) and then navigate to porousGasificationFoam-master.
  4. I source OpenFOAM 8 using $ source /opt/openfoam8/etc/bashrc
  5. I source porousGasificationFoamMediaDirectories using $ source porousGasificationMediaDirectories.
  6. I type in ./Allwclean.
  7. I type in ./Allwmake.

The compilation begins, however after a while I get the following errors:

In file included from pyrolysisModel/volPyrolysis/volPyrolysis.C:27: pyrolysisModel/volPyrolysis/volPyrolysis.H:93:13: error: 'BasicSolidChemistryModel' was not declared in this scope; did you mean 'basicSolidChemistryModel'? 93 | autoPtr<BasicSolidChemistryModel> solidChemistry; | ^~~~~~~~ | basicSolidChemistryModel pyrolysisModel/volPyrolysis/volPyrolysis.H:93:38: error: template argument 1 is invalid 93 | autoPtr<BasicSolidChemistryModel> solidChemistry; | ^~~~~~ pyrolysisModel/volPyrolysis/volPyrolysis.H:93:52: error: expected unqualified-id before '>' token 93 | autoPtr<BasicSolidChemistryModel> solidChemistry; | ^~ pyrolysisModel/volPyrolysis/volPyrolysis.C: In member function 'void Foam::heterogeneousPyrolysisModels::volPyrolysis::solveSpeciesMass()': pyrolysisModel/volPyrolysis/volPyrolysis.C:113:37: error: 'solidChemistry' was not declared in this scope; did you mean 'solidChemistrySh'? 113 | volScalarField sRhoSi = solidChemistry->RRs(i); | ^~~~~~~ | solidChemistrySh pyrolysisModel/volPyrolysis/volPyrolysis.C: In member function 'void Foam::heterogeneousPyrolysisModels::volPyrolysis::calculateMassTransfer()': pyrolysisModel/volPyrolysis/volPyrolysis.C:267:50: error: 'solidChemistry' was not declared in this scope; did you mean 'solidChemistrySh'? 267 | totalGasMassFlux = fvc::domainIntegrate(solidChemistry->RRg()); | ^~~~~~~ | solidChemistrySh pyrolysisModel/volPyrolysis/volPyrolysis.C: In constructor 'Foam::heterogeneousPyrolysisModels::volPyrolysis::volPyrolysis(const Foam::word&, const Foam::fvMesh&, Foam::HGSSolidThermo&, Foam::psiReactionThermo&, Foam::volScalarField&)': pyrolysisModel/volPyrolysis/volPyrolysis.C:319:5: error: class 'Foam::heterogeneousPyrolysisModels::volPyrolysis' does not have any field named 'solidChemistry' 319 | solidChemistry | ^~~~~~~ pyrolysisModel/volPyrolysis/volPyrolysis.C:321:9: error: 'BasicSolidChemistryModel' was not declared in this scope; did you mean 'basicSolidChemistryModel'? 321 | BasicSolidChemistryModel::New | ^~~~~~~~ | basicSolidChemistryModel pyrolysisModel/volPyrolysis/volPyrolysis.C:321:48: error: expected primary-expression before '>' token 321 | BasicSolidChemistryModel::New | ^ pyrolysisModel/volPyrolysis/volPyrolysis.C:326:9: error: no matching function for call to 'New(Foam::HGSSolidThermo&, Foam::PtrList<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, Foam::word)' 326 | ) | ^

pyrolysisModel/volPyrolysis/volPyrolysis.C: In constructor 'Foam::heterogeneousPyrolysisModels::volPyrolysis::volPyrolysis(const Foam::word&, const Foam::fvMesh&, Foam::HGSSolidThermo&, Foam::psiReactionThermo&, Foam::volScalarField&, Foam::volScalarField&)': pyrolysisModel/volPyrolysis/volPyrolysis.C:649:5: error: class 'Foam::heterogeneousPyrolysisModels::volPyrolysis' does not have any field named 'solidChemistry' 649 | solidChemistry | ^~~~~~~ pyrolysisModel/volPyrolysis/volPyrolysis.C:651:9: error: 'BasicSolidChemistryModel' was not declared in this scope; did you mean 'basicSolidChemistryModel'? 651 | BasicSolidChemistryModel::New | ^~~~~~~~ | basicSolidChemistryModel pyrolysisModel/volPyrolysis/volPyrolysis.C:651:48: error: expected primary-expression before '>' token 651 | BasicSolidChemistryModel::New | ^ pyrolysisModel/volPyrolysis/volPyrolysis.C:656:9: error: no matching function for call to 'New(Foam::HGSSolidThermo&, Foam::PtrList<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, Foam::word)' 656 | ) | ^

pyrolysisModel/volPyrolysis/volPyrolysis.C: In member function 'virtual void Foam::heterogeneousPyrolysisModels::volPyrolysis::preEvolveRegion()': pyrolysisModel/volPyrolysis/volPyrolysis.C:1002:13: error: 'solidChemistry' was not declared in this scope; did you mean 'solidChemistrySh'? 1002 | solidChemistry->setCellReacting(cellI, true); | ^~~~~~~ | solidChemistrySh pyrolysisModel/volPyrolysis/volPyrolysis.C:1006:13: error: 'solidChemistry' was not declared in this scope; did you mean 'solidChemistrySh'? 1006 | solidChemistry->setCellReacting(cellI, false); | ^~~~~~~ | solidChemistrySh pyrolysisModel/volPyrolysis/volPyrolysis.C: In member function 'virtual void Foam::heterogeneousPyrolysisModels::volPyrolysis::evolveRegion()': pyrolysisModel/volPyrolysis/volPyrolysis.C:1025:17: error: 'solidChemistry' was not declared in this scope; did you mean 'solidChemistrySh'? 1025 | timeChem = solidChemistry->solve | ^~~~~~~ | solidChemistrySh pyrolysisModel/volPyrolysis/volPyrolysis.C: In member function 'virtual void Foam::heterogeneousPyrolysisModels::volPyrolysis::evolvePorosity()': pyrolysisModel/volPyrolysis/volPyrolysis.C:1060:27: error: 'solidChemistry' was not declared in this scope; did you mean 'solidChemistrySh'? 1060 | porositySource = solidChemistry->RRpor(T)(); | ^~~~~~~ | solidChemistrySh pyrolysisModel/volPyrolysis/volPyrolysis.C: In member function 'virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::heterogeneousPyrolysisModels::volPyrolysis::Srho() const': pyrolysisModel/volPyrolysis/volPyrolysis.C:1165:40: error: 'solidChemistry' was not declared in this scope; did you mean 'solidChemistrySh'? 1165 | const speciesTable& gasTable = solidChemistry->gasTable(); | ^~~~~~~ | solidChemistrySh pyrolysisModel/volPyrolysis/volPyrolysis.C: In member function 'virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::heterogeneousPyrolysisModels::volPyrolysis::Srho(Foam::label) const': pyrolysisModel/volPyrolysis/volPyrolysis.C:1182:40: error: 'solidChemistry' was not declared in this scope; did you mean 'solidChemistrySh'? 1182 | const speciesTable& gasTable = solidChemistry_->gasTable();

Is there a way to fix this?