romant |
November 21, 2011 06:03 |
groovyBC and the pow(x,y) function
Hej,
I wanted to implement a velocity profile with groovyBC. Unfortunately, for some reason I cannot use the pow(x,y) with a non integer :-) the following is supposed to be implemented for the velocity
Code:
inlet
{
type groovyBC;
variables "a=0.39556664;b=2.671836655;distance=0.015-sqrt(sqr(pos().y)+sqr(pos().x));";
valueExpression "vector(0,0,b*pow(distance,0.39556664))";
value uniform (0 0 0);
}
where I tried having a instead of the number withing the pow function as well, but then it said it was missing a numerical value. Maybe somebody has an idea. I get a floating point exception and everything points to swak4foam. The error message is
Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 in "/lib/x86_64-linux-gnu/libm.so.6"
#4 Foam::pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::pow(Foam::UList<double> const&, double const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6 parserPatch::PatchValueExpressionParser::parse() in "/home/roman/OpenFOAM/roman-2.0.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#7 Foam::PatchValueExpressionDriver::parse(std::string const&) in "/home/roman/OpenFOAM/roman-2.0.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#8 Foam::groovyBCFvPatchField<Foam::Vector<double> >::updateCoeffs() in "/home/roman/OpenFOAM/roman-2.0.1/platforms/linux64GccDPOpt/lib/libgroovyBC.so"
#9 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::updateCoeffs() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#10 Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#11 Foam::fv::gaussLaplacianScheme<Foam::Vector<double>, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#12 Foam::fv::gaussLaplacianScheme<Foam::Vector<double>, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#13 Foam::fv::laplacianScheme<Foam::Vector<double>, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#14 Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::fvm::laplacian<Foam::Vector<double>, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleTurbulenceModel.so"
#15 Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::fvm::laplacian<Foam::Vector<double>, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleTurbulenceModel.so"
#16 Foam::incompressible::RASModels::qZeta::divDevReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#17
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/buoyantBoussinesqSimpleFoam"
#18 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#19
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/buoyantBoussinesqSimpleFoam"
Floating point exception
|