CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Problem occurs when adjusting 'turbinesiting' script

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2017, 03:56
Default Problem occurs when adjusting 'turbinesiting' script
  #1
Member
 
JIN WEIGUO
Join Date: Sep 2016
Posts: 35
Rep Power: 6
Mark JIN is on a distinguished road
Dear friends,

I'm a new openfoam user (also has few experience in C++) but have to use openfoam due to my job requirement.

Can any experienced expert help me figure out what was the error as I attached below? This error occurred when I wanted to adjust and apply ABL boundary condition from 'turbinesiting' to my own case. I have ran snappyHexmesh successfully but failed to ran simpleFoam.

Really appreciate for any suggestive guidance!


markjin@markjin-VirtualBox:~/OpenFOAM/markjin-4.1/run/Pavillion$ simpleFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 4.1
Exec : simpleFoam
Date : Feb 06 2017
Time : 17:46:35
Host : "markjin-VirtualBox"
PID : 5988
Case : /home/markjin/OpenFOAM/markjin-4.1/run/Pavillion
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
field p tolerance 0.001
field U tolerance 0.001
field "(k|epsilon|omega)" tolerance 0.001

Reading field p

Reading field U

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 log in "/lib/x86_64-linux-gnu/libm.so.6"
#4 Foam::log(Foam::Field<double>&, Foam::UList<double> const&) at ??:?
#5 Foam::log(Foam::tmp<Foam::Field<double> > const&) at ??:?
#6 Foam::atmBoundaryLayer::U(Foam::Field<Foam::Vector <double> > const&) const at ??:?
#7 Foam::atmBoundaryLayerInletVelocityFvPatchVectorFi eld::atmBoundaryLayerInletVelocityFvPatchVectorFie ld(Foam::fvPatch const&, Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#8 Foam::fvPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::atmBounda ryLayerInletVelocityFvPatchVectorField>::New(Foam: :fvPatch const&, Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#9 Foam::fvPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#10 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::readField(Foam:imensio nedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#11 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) at ??:?
#12 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields() at ??:?
#13 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) at ??:?
#14 ? at ??:?
#15 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#16 ? at ??:?
Floating point exception (core dumped)
markjin@markjin-VirtualBox:~/OpenFOAM/markjin-4.1/run/Pavillion$
Mark JIN is offline   Reply With Quote

Old   February 6, 2017, 04:15
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 404
Rep Power: 12
Antimony is on a distinguished road
Hi,

What are the values you used for z0, zGround in the ABL definition? And what is the minimum vertical direction coordinate in your simulation?

The output posted seems to indicate a problem with the log function - you are probably taking the log of a non-positive value.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   February 6, 2017, 04:34
Default
  #3
Member
 
JIN WEIGUO
Join Date: Sep 2016
Posts: 35
Rep Power: 6
Mark JIN is on a distinguished road
Quote:
Originally Posted by Antimony View Post
Hi,

What are the values you used for z0, zGround in the ABL definition? And what is the minimum vertical direction coordinate in your simulation?

The output posted seems to indicate a problem with the log function - you are probably taking the log of a non-positive value.

Cheers,
Antimony

Dear Antimony,

Thanks for your reply. Please see my ABL as follow. Should I set zGround to be 0? In my case, minimum vertical direction is 0.


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

Uref 10.0;
Zref 20;
zDir (0 0 1);
flowDir (1 0 0);
z0 uniform 0.1;
zGround uniform 935.0;
value $internalField;

// ************************************************** *********************** //
Mark JIN is offline   Reply With Quote

Old   February 6, 2017, 05:02
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 404
Rep Power: 12
Antimony is on a distinguished road
Hi,

Yes, if your minimum vertical direction coordinate is 0, then zGround should be that.

If you look at the formulation of the ABL velocity, you will see it is log(z+z0-zGround).

If you don't set zGround according to your geometry, it is clear that you will get log of a negative number, which isn't real.

Hope this clarifies.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   February 6, 2017, 05:05
Default
  #5
Member
 
JIN WEIGUO
Join Date: Sep 2016
Posts: 35
Rep Power: 6
Mark JIN is on a distinguished road
Quote:
Originally Posted by Antimony View Post
Hi,

Yes, if your minimum vertical direction coordinate is 0, then zGround should be that.

If you look at the formulation of the ABL velocity, you will see it is log(z+z0-zGround).

If you don't set zGround according to your geometry, it is clear that you will get log of a negative number, which isn't real.

Hope this clarifies.

Cheers,
Antimony


Dear Antimony,

Many thanks for the clarification, it has been solved thanks to your guide!

Best,
MarkJIN
Mark JIN is offline   Reply With Quote

Old   January 11, 2021, 16:10
Default Negative z coordinate
  #6
Member
 
Join Date: Nov 2018
Posts: 30
Rep Power: 4
MaySea is on a distinguished road
Hi,

Does anyone know if it's somehow possible to run atmBoundaryLayer package with negative vertical coordinates?

I am trying to impose the logarithmic profile over a bathymetric surface, where z represents depth, hence the lowest point is negative. My ABL conditions file:

Code:
kappa                0.40;          
Cmu                  0.09;          
flowDir              (0.382683432 -0.923879533 0);
zDir                 (0 0 1);       
Uref                 0.87;       
Zref                 -0.1;        // near the water surface    
z0                   uniform 0.009525; 
d                    uniform 0.0; 
zGround	     -58.4583;  //  minimum seabed depth [m] at the inlets
I keep getting this error:

Code:
Time = 0
--> FOAM Warning : 
    From function Foam::Field<Type>::Field(const Foam::word&, const Foam::dictionary&, Foam::label) [with Type = double; Foam::label = int]
    in file /opt/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude/Field.C at line 324
    Reading "/home/jan/0/k.boundaryField.north" from line 33 to line 35
    expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib64/libc.so.6"
#3  log in "/lib64/libm.so.6"
#4  Foam::log(Foam::Field<double>&, Foam::UList<double> const&) at ??:?
#5  Foam::log(Foam::tmp<Foam::Field<double> > const&) at ??:?
#6  Foam::atmBoundaryLayer::atmBoundaryLayer(Foam::Field<Foam::Vector<double> > const&, Foam::dictionary const&) at ??:?
#7  Foam::atmBoundaryLayerInletKFvPatchScalarField::atmBoundaryLayerInletKFvPatchScalarField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#8  Foam::fvPatchField<double>::adddictionaryConstructorToTable<Foam::atmBoundaryLayerInletKFvPatchScalarField>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#9  Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#10  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::readField(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#11  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) at ??:?
#12  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields() at ??:?
#13  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) at ??:?
#14  ? at ??:?
#15  ? at ??:?
#16  __libc_start_main in "/lib64/libc.so.6"
#17  ? at ??:?
Do I need to shift the z coordinates to positive values or is there a workaround?
MaySea is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with rotation (ANSYS by script) etastar68 ANSYS 0 February 28, 2014 18:57
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
ICEM script problem Zbynek CFX 0 October 12, 2004 08:05
extremely simple problem... can you solve it properly? Mikhail Main CFD Forum 40 September 9, 1999 10:11


All times are GMT -4. The time now is 20:16.