spitchers |
May 18, 2017 11:26 |
Adding Temperature variations to Density in interFoam
Hi all,
I have recently added a temperature equation to interFoam with success and have verified the results on a few test cases. I got very good convergence, speed, and accuracy.
I then have moved on to try and add temperature variations to the density equation:
Current Equation: rho = alpha1*rho1 + (1.0 - alpha1)*rho2;
New Equation needed: rho = alpha1*rho1*(1 - beta1*(T_TRef1)) + (1.0 - alpha1)*rho2*(1 - beta2*(T_TRef2));
However I am unable to get this to work.
I kept getting errors, so I have tried to trace this error back. It seems to be coming from the incompressibleTwoPhaseMixture libraries.
I tried to update these libraries to read the files I need from the transportProperties dictionary... but it fails every time!
I have just copied and pasted the same method that worked to correctly read in the cp1, cp2, Pr1, Pr2 from both phases. I compile it all fine, then go to run my code (even with the same equations that worked before I updated the twophase libraries) and I get an error.
Code:
GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 5.102515963e-06, No Iterations 8
time step continuity errors : sum local = 5.72136875e-12, global = 4.063542116e-13, cumulative = 4.063542116e-13
[0] #0 Foam::error::printStack(Foam::Ostream&)[3] #0 Foam::error::printStack(Foam::Ostream&)[2] #0 Foam::error::printStack(Foam::Ostream&)[4] #0 Foam::error::printStack(Foam::Ostream&)[1] #0 Foam::error::printStack(Foam::Ostream&) at ??:?
[2] #1 Foam::sigSegv::sigHandler(int) at ??:?
[3] #1 Foam::sigSegv::sigHandler(int) at ??:?
[4] #1 Foam::sigSegv::sigHandler(int) at ??:?
at ??:?
[2] #[0] #1 Foam::sigSegv::sigHandler(int)2 ? at ??:?
[4] #2 ? at ??:?
[3] #2 ? at ??:?
[1] #1 Foam::sigSegv::sigHandler(int) in "/lib/x86_64-linux-gnu/libc.so.6"
[2] #3 Foam::objectRegistry::getEvent() const in "/lib/x86_64-linux-gnu/libc.so.6"
[4] #3 Foam::objectRegistry::getEvent() const in "/lib/x86_64-linux-gnu/libc.so.6"
[3] #3 Foam::objectRegistry::getEvent() const at ??:?
[1] #2 ? at ??:?
[0] #2 ? at ??:?
[4] #4 Foam::regIOobject::regIOobject(Foam::IOobject const&, bool) in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3 Foam::objectRegistry::getEvent() const at ??:?
[2] #4 Foam::regIOobject::regIOobject(Foam::IOobject const&, bool) in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #3 Foam::objectRegistry::getEvent() const at ??:?
at ??:?
[4] #5 [3] #4 Foam::regIOobject::regIOobject(Foam::IOobject const&, bool) at ??:?
[2] #5 Foam::DimensionedField<double, Foam::volMesh>::DimensionedField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, bool) at ??:?
[1] #4 Foam::regIOobject::regIOobject(Foam::IOobject const&, bool)Foam::DimensionedField<double, Foam::volMesh>::DimensionedField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, bool) at ??:?
[0] #4 Foam::regIOobject::regIOobject(Foam::IOobject const&, bool) at ??:?
[4] #6 at ??:?
[2] #6 at ??:?
[3] #5 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)Foam::DimensionedField<double, Foam::volMesh>::DimensionedField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, bool)Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&) at ??:?
[0] #5 at ??:?
[1] #5 at ??:?
[4] #7 at ??:?
[3] #6 Foam::DimensionedField<double, Foam::volMesh>::DimensionedField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, bool) at ??:?
[2] #7 Foam::DimensionedField<double, Foam::volMesh>::DimensionedField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, bool)Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)Foam::reuseTmpGeometricField<double, double, Foam::fvPatchField, Foam::volMesh>::New(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::word const&, Foam::dimensionSet const&) at ??:?
[1] #6 at ??:?
[0] #6 Foam::reuseTmpGeometricField<double, double, Foam::fvPatchField, Foam::volMesh>::New(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::word const&, Foam::dimensionSet const&)Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&) at ??:?
[3] #7 at ??:?
[4] #8 Foam::reuseTmpGeometricField<double, double, Foam::fvPatchField, Foam::volMesh>::New(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::word const&, Foam::dimensionSet const&)Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
[2] #8 at ??:?
[3] #8 at ??:?
[0] #7 at ??:?
[4] #9 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(double const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)Foam::reuseTmpGeometricField<double, double, Foam::fvPatchField, Foam::volMesh>::New(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::word const&, Foam::dimensionSet const&) at ??:?
[1] #7 at ??:?
[2] #9 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(double const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
[3] #9 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(double const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)Foam::reuseTmpGeometricField<double, double, Foam::fvPatchField, Foam::volMesh>::New(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::word const&, Foam::dimensionSet const&) at ??:?
[0] #8 at ??:?
[4] #10 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::F2() const at ??:?
[2] #10 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::F2() const at ??:?
[3] #10 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::F2() constFoam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
[1] #8 at ??:?
[4] #11 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::F23() const at ??:?
[2] #11 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::F23() const at ??:?
[3] #11 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::F23() const at ??:?
[0] #9 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(double const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
[4] #12 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:?
[3] #12 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:?
[0] #10 at ??:?
[1] #9 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(double const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::F2() const at ??:?
[2] #12 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > >, Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:?
--------------------------------------------------------------------------
mpirun noticed that process rank 2 with PID 29483 on node shaun-VirtualBox exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
This is very frustrating!!
Could someone please point me in the right direction. If you are able to help me successfully read the values from transportProperties, I feel like I could take it from there.
Any help would be much appreciated.
|