CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Aeroacoustic modelling using groovyBC (http://www.cfd-online.com/Forums/openfoam-solving/112407-aeroacoustic-modelling-using-groovybc.html)

duncan21187 January 28, 2013 08:27

Aeroacoustic modelling using groovyBC
 
Hi All
I am attempting to simulate pressure wave propagation in a pipe, using an oscillating pressure boundary condition defined using the groovyBC utility. When attempting to run I get the following error message:

Create time

Create mesh for time = 0


PIMPLE: max iterations = 50
field "(U|k|epsilon)" : relTol 0, tolerance 0.0001

Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<sutherlandTransport<specieT hermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model kOmegaSST
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libcompressibleRASModels.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libcompressibleRASModels.so"
#6 Foam::compressible::RASModels::kOmegaSST::F2() const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libcompressibleRASModels.so"
#7 Foam::compressible::RASModels::kOmegaSST::kOmegaSS T(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&, Foam::word const&, Foam::word const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libcompressibleRASModels.so"
#8 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::kOmegaS ST>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&, Foam::word const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libcompressibleRASModels.so"
#9 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&, Foam::word const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libcompressibleRASModels.so"
#10 Foam::compressible::turbulenceModel::addturbulence ModelConstructorToTable<Foam::compressible::RASMod el>::NewturbulenceModel(Foam::GeometricField<doubl e, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&, Foam::word const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libcompressibleRASModels.so"
#11 Foam::compressible::turbulenceModel::New(Foam::Geo metricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&, Foam::word const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libcompressibleTurbulenceModel.so"
#12
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/rhoPimpleFoam"
#13 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#14
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/rhoPimpleFoam"
Floating point exception (core dumped)

I am aware that printStack errors often hint to a lack of sufficient memory to run the calculation (I am running this on a laptop) but I was wondering if there was anything else it could be?

Many thanks

Duncan

ngj January 28, 2013 08:41

Hi Duncan,

If you read the error message from the bottom and upward, i.e. starting with "#14", it first tells you that somewhere in the turbulence model, a bad operation occurs (#11). Later on, it specifically tells you that it is in the compressible implementation of kOmegaSST (#7) and even more specifically in the F2() method of the turbulence model (#6).

The important thing then is told, namely that the operation, which goes wrong is a division (#4 and #3), which suggests division by 0 (read: zero). Thus conclusion:

Check that neither the internal field nor the boundary values in k and omega are not 0. I am unsure how the printStack would look like, but the zero could originate from a correct evaluation of groovyBC, which returns zero, which then goes wrong internally in the turbulence model.

Good luck,

Niels

duncan21187 January 29, 2013 07:28

Thanks Niels.
I have checked both of them and have improved the situation somewhat. It now appears to be a case of choosing the pressure boundary conditions. The simulation will crash after the first iteration with the following printStack error:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::hPsiThermo<Foam::pureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam::perfectGas> > > > >::calculate() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so"
#4 Foam::hPsiThermo<Foam::pureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam::perfectGas> > > > >::correct() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so"
#5
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/rhoPimpleFoam"
#6 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#7
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/rhoPimpleFoam"
Floating point exception (core dumped)

if I use anything other than 'zeroGradient' for both inlet and outlet 'p' fields. I have tried using a 'groovyBCFixedValue' field and a simple 'fixedValue' field but both yield the same result. Can anyone suggest why this might be please?

Many thanks

Duncan

ngj January 29, 2013 08:08

Hi Duncan,

I have never run anything with the termodynamic models, so I am unfortunately not the right person to ask.

Though, you could go to the method

[CODE]
Foam::hPsiThermo<Foam::pureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam::perfectGas> > > > >::calculate()
[CODE]

and see, whether some of the operations could produce a crash (reason: latest reported point in the print stack). This could e.g. be sqrt of a negative number, negative numbers to a scalar power, tanh to a large number, etc.

Good luck,

Niels


All times are GMT -4. The time now is 10:27.