aviator |
November 11, 2013 22:34 |
Power law inlet velocity using groovyBC
Hi all,
I am using OpenFOAM 2.2.1 and have installed swak4Foam 0.2.4
I need to use a power law as an inlet velocity, and the outlet wind profile is set same as the inlet wind profile.
This is my 0/U
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (6.751 0 0);
boundaryField
{
upper
{
type fixedValue;
value uniform (6.751 0 0);
}
front
{
type groovyBC;
value uniform (0 0 0);
variables (
"Umet=6.751;"
"height=pos().y;"
"quo=height/60;"
);
valueExpression
"-Umet*pow(quo,0.2)*normal()";
}
back
{
type groovyBC;
value uniform (0 0 0);
variables (
"Umet=6.751;"
"height=pos().y;"
"quo=height/60;"
);
valueExpression
"-Umet*pow(quo,0.2)*normal()";
}
square
{
type fixedValue;
value uniform (0 0 0);
}
floor
{
type fixedValue;
value uniform (0 0 0);
}
right
{
type symmetryPlane;
}
left
{
type symmetryPlane;
}
}
// ************************************************************************* //
But I got the following error.
Code:
swak4Foam: Allocating new repository for sampledGlobalVariables
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam221/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&, Foam::UList<double> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::pow(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6 parserPatch::PatchValueExpressionParser::parse() in "/home/openfoam/OpenFOAM/openfoam-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#7 Foam::PatchValueExpressionDriver::parseInternal(int) in "/home/openfoam/OpenFOAM/openfoam-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#8 Foam::CommonValueExpressionDriver::parse(std::string const&, Foam::word const&) in "/home/openfoam/OpenFOAM/openfoam-2.2.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#9 Foam::groovyBCFvPatchField<Foam::Vector<double> >::updateCoeffs() in "/home/openfoam/OpenFOAM/openfoam-2.2.1/platforms/linux64GccDPOpt/lib/libgroovyBC.so"
#10 at gaussLaplacianSchemes.C:0
#11 Foam::fv::gaussLaplacianScheme<Foam::Vector<double>, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam221/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/openfoam221/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/openfoam221/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&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libincompressibleTurbulenceModel.so"
#15 Foam::incompressible::RASModels::kOmegaSST::divDevReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#16
in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/pisoFoam"
#17 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#18
in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/pisoFoam"
Floating point exception (core dumped)
Can someone please clarify this. I am fairly new to OpenFOAM and would appreciate your help. Thank you.
|