CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

groovyBC issue - k and epsilon

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   February 20, 2014, 17:58
Default
  #21
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by LamiaOF2.1 View Post
hello
I am trying to program with groovy BC this equation

w=alpha*Uref/sqrt(C)*Yref

I tried this but it gives me an error message
inlet
{
type groovyBC;
variables "Uref=5;Yref=0.5;alpha=0.33;C=0.09;
omg=((Uref*alpha)/(sqrt(C)*Yref));"
valueExpression "omg";
}

so is that make any sens?
Error message would be most helpful.

Anyway: I'm pretty sure (too lazy to bother checking the code) that is not a valid character in a fieldname. Maybe that is the problem
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 22, 2014, 09:34
Default groovy
  #22
New Member
 
Lamia
Join Date: Feb 2013
Posts: 18
Rep Power: 4
LamiaOF2.1 is on a distinguished road
hello again
well I tried this
inlet
{
type groovyBC;
variables "Uref=5;Yref=0.5;alpha=0.33;C=0.09;omg=((Uref*alph a)/(sqrt(C)*Yref));"

valueExpression "omg";
}

and here is the error message

--> FOAM Warning :
From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict)
in file groovyBCFvPatchField.C at line 131
No value defined for U on inlet therefore using 460{(0 0 0)}
Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kOmegaSST
--> FOAM Warning :
From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict)
in file groovyBCFvPatchField.C at line 131
No value defined for omega on inlet therefore using 460{0}
bounding omega, min: 0 max: 1 average: 1
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam220/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/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#5 at kOmegaSST.C:0
#6 Foam::incompressible::RASModels::kOmegaSST::F2() const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#7 Foam::incompressible::RASModels::kOmegaSST::F23() const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#8 Foam::incompressible::RASModels::kOmegaSST::kOmega SST(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#9 Foam::incompressible::RASModel::adddictionaryConst ructorToTable<Foam::incompressible::RASModels::kOm egaSST>::New(Foam::GeometricField<Foam::Vector<dou ble>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#10 Foam::incompressible::RASModel::New(Foam::Geometri cField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#11
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/simpleFoam"
#12 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#13
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/simpleFoam"
Exception en point flottant


please; I need help
LamiaOF2.1 is offline   Reply With Quote

Old   February 22, 2014, 12:32
Default
  #23
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by LamiaOF2.1 View Post
hello again
well I tried this
inlet
{
type groovyBC;
variables "Uref=5;Yref=0.5;alpha=0.33;C=0.09;omg=((Uref*alph a)/(sqrt(C)*Yref));"

valueExpression "omg";
}

and here is the error message

--> FOAM Warning :
From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict)
in file groovyBCFvPatchField.C at line 131
No value defined for U on inlet therefore using 460{(0 0 0)}
Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kOmegaSST
--> FOAM Warning :
From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict)
in file groovyBCFvPatchField.C at line 131
No value defined for omega on inlet therefore using 460{0}
At this place groovy tells you that during initializiation it needs a entry "value", doesn't find one and therefor assumes 0. Which leads to the "divide by zero" below.

The reason why it needs value is that it can't evaluate valueExpression during intialization because it can't be sure that all the needed fields are already loaded into memory. The value is only used during the first timestep

Don't know what else I can do to alert people to this apart from issuing a warning. Make it fail?

Quote:
Originally Posted by LamiaOF2.1 View Post
bounding omega, min: 0 max: 1 average: 1
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam220/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/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#5 at kOmegaSST.C:0
#6 Foam::incompressible::RASModels::kOmegaSST::F2() const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#7 Foam::incompressible::RASModels::kOmegaSST::F23() const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#8 Foam::incompressible::RASModels::kOmegaSST::kOmega SST(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#9 Foam::incompressible::RASModel::adddictionaryConst ructorToTable<Foam::incompressible::RASModels::kOm egaSST>::New(Foam::GeometricField<Foam::Vector<dou ble>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#10 Foam::incompressible::RASModel::New(Foam::Geometri cField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#11
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/simpleFoam"
#12 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#13
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/simpleFoam"
Exception en point flottant


please; I need help
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 23, 2014, 09:47
Default groovy bc
  #24
New Member
 
Lamia
Join Date: Feb 2013
Posts: 18
Rep Power: 4
LamiaOF2.1 is on a distinguished road
hello Bernhard
I am sorry for my ignorance but I am new user of OpenFoam
I complitely understand you but I don't know how to enter this missing value
is it that way?

internalField uniform 400;// calcul omega

boundaryField
{
inlet
{
type groovyBC;
value uniform 400;
variables "Uref=5;Yref=0.5;alpha=0.33;C=0.09;omg=((Uref*alph a)/(sqrt(C)*Yref));"

valueExpression "omg";
}

cause it keeps giving me an error message
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

--> FOAM Warning :
From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict)
in file groovyBCFvPatchField.C at line 131
No value defined for U on inlet therefore using 460{(0 0 0)}
Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kOmegaSST
kOmegaSSTCoeffs
{
alphak1 0.85034;
alphak2 1;
alphaOmega1 0.5;
alphaOmega2 0.85616;
gamma1 0.5532;
gamma2 0.4403;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
c1 10;
Cmu 0.09;
alphaK1 0.85034;
alphaK2 1;
b1 1;
F3 false;
}

Creating finite volume options
No finite volume options present


SIMPLE: convergence criteria
field p tolerance 1e-06
field U tolerance 1e-06
field "(k|epsilon|omega)" tolerance 1e-06


Starting time loop

streamLine : automatic track length specified through number of sub cycles : 5

Time = 1e-05

swak4Foam: Allocating new repository for sampledGlobalVariables
--> FOAM Warning :
From function gaussConvectionScheme
in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 123
Reading "/home/openfoam/Bureau/Kwsstmodelprofilomegagroovybc/system/fvSchemes.divSchemes.div(phi,U)" at line 33
Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness.
To remove this warning switch off 'boundedGauss' in "/opt/openfoam220/etc/controlDict"
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.00654075, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.00985678, No Iterations 647
time step continuity errors : sum local = 1.11693e-07, global = -2.60785e-09, cumulative = -2.60785e-09
--> FOAM Warning :
From function gaussConvectionScheme
in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 123
Reading "/home/openfoam/Bureau/Kwsstmodelprofilomegagroovybc/system/fvSchemes.divSchemes.div(phi,omega)" at line 35
Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness.
To remove this warning switch off 'boundedGauss' in "/opt/openfoam220/etc/controlDict"
DILUPBiCG: Solving for omega, Initial residual = 0.0790587, Final residual = 0.000242277, No Iterations 1
bounding omega, min: 0 max: 1.80129e+06 average: 2158.86
--> FOAM Warning :
From function gaussConvectionScheme
in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 123
Reading "/home/openfoam/Bureau/Kwsstmodelprofilomegagroovybc/system/fvSchemes.divSchemes.div(phi,k)" at line 34
Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness.
To remove this warning switch off 'boundedGauss' in "/opt/openfoam220/etc/controlDict"
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 0.0373248, No Iterations 1
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam220/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/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#5 at kOmegaSST.C:0
#6 Foam::incompressible::RASModels::kOmegaSST::F2() const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#7 Foam::incompressible::RASModels::kOmegaSST::F23() const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#8 Foam::incompressible::RASModels::kOmegaSST::correc t() in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#9
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/simpleFoam"
#10 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#11
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/simpleFoam"
Exception en point flottant


thank you for your help and patiente...
LamiaOF2.1 is offline   Reply With Quote

Old   March 1, 2015, 08:16
Default
  #25
Member
 
Join Date: Jun 2011
Posts: 65
Rep Power: 6
maalan is on a distinguished road
Quote:
Haven't looked at the IB-stuff yet so I can't say anything clever here
Hi Bernhard! Did you already have a look at the IBM?

I use the foam-extend-3.1 release and would like to compute some 'swakExpressions' but I am stuck up to the moment... I have to say that I did compute these expressions in a conformal mesh successfully.

In my case, I try to simulate the flow past a cylinder by using the IB method. I would like to calculate, for instance:
Code:
        type swakExpression;
        valueType patch;
        patchName ibCylinder;
        accumulations (
            sum
        );
        expression "(vorticity^normal())&vectorAconst*area()";
        verbose true;
I tried to integrate this variable over the cylinder surface in each timeStep, but unfortunately I obtain always zero.

How do you think I could manage this issue?
Any help would be appreciated.

Thanks!
maalan is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 13 November 4, 2013 15:13
epsilon groovyBC problem Thom OpenFOAM Running, Solving & CFD 5 October 26, 2012 05:16
epsilon and K blowing up. sivakumar OpenFOAM Running, Solving & CFD 1 October 25, 2012 04:50
K Epsilon convergance issue Ollie OpenFOAM 2 April 18, 2011 08:28
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 1 November 25, 2008 21:21


All times are GMT -4. The time now is 15:53.