Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken in OpenFOAM-dev: TurbulenceModels library replaced by MomentumTransportModels #129

Closed
MakisH opened this issue May 19, 2020 · 3 comments
Milestone

Comments

@MakisH
Copy link
Member

MakisH commented May 19, 2020

We have a problem with radical changes in OpenFOAM.org, already released in OpenFOAM-dev 20200426 and mainly originating from this commit.

Trying to build the adapter currently fails with:

In file included from CHT/KappaEffective.C:1:0:
CHT/KappaEffective.H:4:39: fatal error: turbulentFluidThermoModel.H: No such file or directory

I am currently not sure how much this change affects us, but it could be anywhere from "a little" to "vastly".

As a starting points, I see this change everywhere:

- #include "turbulentFluidThermoModel.H"
+ #include "fluidThermoMomentumTransportModel.H"

as well as in Make/options:

- -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
- -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
+ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
+ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \

and

- -lturbulenceModels \
- -lcompressibleTurbulenceModels \
+ -lmomentumTransportModels \
+ -lfluidThermoMomentumTransportModels \

Another related error I got:

In file included from CHT/KappaEffective.C:1:0:
CHT/KappaEffective.H:6:37: fatal error: turbulentTransportModel.H: No such file or directory

Related changes:

- #include "turbulentTransportModel.H"
+ #include "kinematicMomentumTransportModel.H"

as well as in the Make/options:

- -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
- -I$(LIB_SRC)/transportModels \
- -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
+ -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
+ -I$(LIB_SRC)/transportModels/lnInclude \

and

- -lincompressibleTurbulenceModels \
+ -lincompressibleMomentumTransportModels \

And then, of course, we need to update how we access kappaEff, nu, etc:

CHT/KappaEffective.H:28:31: error: ‘turbulenceModel’ in namespace ‘Foam::compressible’ does not name a type
     const Foam::compressible::turbulenceModel & turbulence_;
                               ^
CHT/KappaEffective.H:58:33: error: ‘turbulenceModel’ in namespace ‘Foam::incompressible’ does not name a type
     const Foam::incompressible::turbulenceModel & turbulence_;
                                 ^
CHT/KappaEffective.C: In constructor ‘preciceAdapter::CHT::KappaEff_Compressible::KappaEff_Compressible(const Foam::fvMesh&)’:
CHT/KappaEffective.C:16:1: error: class ‘preciceAdapter::CHT::KappaEff_Compressible’ does not have any field named ‘turbulence_’
 turbulence_(
 ^
CHT/KappaEffective.C:17:23: error: ‘turbulenceModel’ is not a member of ‘Foam::compressible’
     mesh.lookupObject<compressible::turbulenceModel>(turbulenceModel::propertiesName)
                       ^
CHT/KappaEffective.C:17:23: error: ‘turbulenceModel’ is not a member of ‘Foam::compressible’
CHT/KappaEffective.C:17:54: error: ‘turbulenceModel’ has not been declared
     mesh.lookupObject<compressible::turbulenceModel>(turbulenceModel::propertiesName)
                                                      ^
CHT/KappaEffective.C: In member function ‘void preciceAdapter::CHT::KappaEff_Compressible::extract(uint, bool)’:
CHT/KappaEffective.C:31:61: error: ‘turbulence_’ was not declared in this scope
         kappaEff_= patchInterpolator.faceToPointInterpolate(turbulence_.kappaEff() ().boundaryField()[patchID]);
                                                             ^
CHT/KappaEffective.C:36:21: error: ‘turbulence_’ was not declared in this scope
         kappaEff_ = turbulence_.kappaEff() ().boundaryField()[patchID];
                     ^
CHT/KappaEffective.C: In constructor ‘preciceAdapter::CHT::KappaEff_Incompressible::KappaEff_Incompressible(const Foam::fvMesh&, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string)’:
CHT/KappaEffective.C:58:1: error: class ‘preciceAdapter::CHT::KappaEff_Incompressible’ does not have any field named ‘turbulence_’
 turbulence_(
 ^
CHT/KappaEffective.C:59:23: error: ‘turbulenceModel’ is not a member of ‘Foam::incompressible’
     mesh.lookupObject<incompressible::turbulenceModel>(turbulenceModel::propertiesName)
                       ^
CHT/KappaEffective.C:59:23: error: ‘turbulenceModel’ is not a member of ‘Foam::incompressible’
CHT/KappaEffective.C:59:56: error: ‘turbulenceModel’ has not been declared
     mesh.lookupObject<incompressible::turbulenceModel>(turbulenceModel::propertiesName)
                                                        ^
CHT/KappaEffective.C: In member function ‘void preciceAdapter::CHT::KappaEff_Incompressible::extract(uint, bool)’:
CHT/KappaEffective.C:128:30: error: ‘turbulence_’ was not declared in this scope
     const scalarField & nu = turbulence_.nu() ().boundaryField()[patchID];
                              ^

All this is particularly interesting in the context of #32 and #128, but it looks exactly like the type of radical change I was hoping to not happen:

we will have an issue if fundamental functions we use all the time start changing

@MakisH
Copy link
Member Author

MakisH commented May 19, 2020

Further changes:

  • Foam::incompressible::turbulenceModel becomes Foam::incompressible::momentumTransportModel.
  • Foam::compressible::turbulenceModel becomes Foam::compressible::momentumTransportModel.
  • turbulenceModel::propertiesName is now used directly as turbulenceProperties, if I understand correctly - before/after (this is something we could always use).
  • In Make/options:
    - -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \
    + -I$(LIB_SRC)/twoPhaseModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \
  • I am still not sure how to access kappaEff in the new structure. Current error:
    CHT/KappaEffective.C:31:73: error: ‘const momentumTransportModel {aka const class Foam::CompressibleMomentumTransportModel<Foam::fluidThermo>}’ has no member named ‘kappaEff’
        kappaEff_= patchInterpolator.faceToPointInterpolate(turbulence_.kappaEff() ().boundaryField()[patchID]);
    
    According to this commit, it looks like we need to add a new ThermophysicalTransportModel.

@MakisH
Copy link
Member Author

MakisH commented Sep 19, 2022

Closing as there is now a compatible version in the OpenFOAM8 branch and in the _OpenFOAM8 archives in our releases.

@MakisH MakisH closed this as completed Sep 19, 2022
@MakisH MakisH added this to the v1.2.0 milestone Sep 19, 2022
@precice-bot
Copy link

This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/installation-on-ubuntu-20-04/1340/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants