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

Upgrading Simple Foam Turbine example to buoyantBoussinesqSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By mAlletto
  • 1 Post By mAlletto
  • 1 Post By tobiasS

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 5, 2019, 11:38
Default Upgrading Simple Foam Turbine example to buoyantBoussinesqSimpleFoam
  #1
New Member
 
Burak
Join Date: Nov 2012
Posts: 14
Rep Power: 13
Burak_1984 is on a distinguished road
Hi Foamers


I am trying to merge the TurbineSiting tutorial in Simple foam tutorials with the BosinessqSimpleFoam tutorials hot room tutorial.I got stuck somewhere eventually.The error start with reading/calculating flux phi

Basically I would like to have a turbinesiting case with the heat and rising thermal air. So I migrated most of my files from the turbinesiting.I am using the blockmesh dictionary and the snappyhexmesh dictionarias as it is.So my mesh is identical to this example

Then I also added the different files from the buoyantBoussinesqSimpleFoam example;These files include Alpat , p_rgh ,T .I have changed the names here to reflect the boundary condition names in the turbine siting tutorial.


In fvSchemes I only changed the Gauss Linear limited >Gauss linear limited corrected 0.33; as it is in the Turbine siting scheme.However I copied tis fvSchemes from the hotroom example which has only the addition of div(phi,T) bounded Gauss upwind; in divergence schemes.


For fvSolutions I took it directly from the hot room example without any changes.My control dictionary is taken from that example likewise.


In order to not to complicate thing I didn’t do any paralelization at first.So what I do while runing is pretty simple;


BlockMesh
snappyHexMesh -overwrite
buoyantBoussinesqSimpleFoam

I checked my mesh and it seems okay and understand the patches etc.I am getting this error at the end;


“Create time
Create mesh for time = 0

SIMPLE: convergence criteria
field p_rgh tolerance 0.01
field U tolerance 0.0001
field T tolerance 0.01
field "(k|epsilon|omega)" tolerance 0.001

Reading thermophysical properties

Reading field T
Reading field p_rgh
Reading field U
Reading/calculating face flux field phi


#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::surfaceInterpolation::makeWeights() const at ??:?
#4 Foam::surfaceInterpolation::weights() const at ??:?
#5 Foam::surfaceInterpolationScheme<Foam::Vector<doub le> >::dotInterpolate(Foam::GeometricField<Foam::Vecto r<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#6 Foam::fvc::flux(Foam::GeometricField<Foam::Vector< double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#7 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
#8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
Floating point exception (core dumped)


I first suspectedthere is an error in Alpat because when I open the Parafoam and click this value it crashes.Then I changed the inlet value from zero gradient to constant zero.I can look at it in the paraview but I still have the error.

Could you guys help and guide me in constructing a working example?

My second step in this effort is to divide the mesh into patches and give different patch T values for uneven heating.

I hope I was clear at explaning myself.

Thanks for the answers and effort.Greatly appriciate it.


Note:Here I also included my files in a zip file ready to run.(4.5MB).Also attached you can see my alphat and U files in txt format.


https://drive.google.com/open?id=1ZK...JSZ91o4Pah50Tp

Regard
Burak K


p { margin-bottom: 0.1in; line-height: 115%; }
Attached Files
File Type: txt alphatandU.txt (3.0 KB, 3 views)
Burak_1984 is offline   Reply With Quote

Old   January 5, 2019, 13:59
Default
  #2
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 12
massive_turbulence is on a distinguished road
Not sure how much this helps but using compressibleTwoPhaseEulerFoam might also work.
massive_turbulence is offline   Reply With Quote

Old   January 7, 2019, 06:15
Thumbs up
  #3
New Member
 
Burak
Join Date: Nov 2012
Posts: 14
Rep Power: 13
Burak_1984 is on a distinguished road
Quote:
Originally Posted by massive_turbulence View Post
Not sure how much this helps but using compressibleTwoPhaseEulerFoam might also work.
Hi thanks for the rapid response.Evey bit helps I guess .

I checked the model but it seems to complicate my situation.I would like to maintain the structure of folders etc to some degree to still have a grip of it.

But thanks for the effort!
Burak_1984 is offline   Reply With Quote

Old   January 7, 2019, 07:17
Default
  #4
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 12
massive_turbulence is on a distinguished road
Quote:
Originally Posted by Burak_1984 View Post
Hi thanks for the rapid response.Evey bit helps I guess .

I checked the model but it seems to complicate my situation.I would like to maintain the structure of folders etc to some degree to still have a grip of it.

But thanks for the effort!
To make changes like this you'd have to know the two solvers inside and out, meaning that you need to probably change the source and recompile it to work. Changing the object files will probably not work as something is obviously terribly wrong.
massive_turbulence is offline   Reply With Quote

Old   January 7, 2019, 10:56
Default
  #5
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Hello. Your error comes from the file createPhi.H. This file creates the face fluxes. It interpolates the velocity U at the faces und make the do product with the surface normal vector.

See also https://www.openfoam.com/documentati...8H_source.html


So from a first guess I think something is wrong with U. (I did not have the time to look at the zip file you provided)
mAlletto is offline   Reply With Quote

Old   January 7, 2019, 15:30
Default
  #6
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
I just executed checkMesh on your mesh and this is the output:


Code:
  Checking basic cellZone addressing...
    No cellZones found.

Checking geometry...
    Overall domain bounding box (581321 4.78537e+06 938.71) (582290 4.78624e+06 1500)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (1.27842e-16 -3.45359e-17 0) OK.
 ***High aspect ratio cells found, Max aspect ratio: 1.81704e+152, number of cells 44006
  <<Writing 44006 cells with high aspect ratio to set highAspectRatioCells
 ***Zero or negative face area detected.  Minimum area: 0
  <<Writing 174456 zero area faces to set zeroAreaFaces
 ***Zero or negative cell volume detected.  Minimum negative volume: -4.83139e-08, Number of negative volume cells: 67083
  <<Writing 67083 zero volume cells to set zeroVolumeCells
    Mesh non-orthogonality Max: 180 average: 67.1048
   *Number of severely non-orthogonal (> 70 degrees) faces: 4094.
 ***Number of non-orthogonality errors: 210990.
  <<Writing 215084 non-orthogonal faces to set nonOrthoFaces
 ***Error in face pyramids: 22095 faces are incorrectly oriented.
  <<Writing 20667 faces with incorrect orientation to set wrongOrientedFaces
 ***Max skewness = 5.43226e+143, 38549 highly skew faces detected which may impair the quality of the results
  <<Writing 38549 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 6 mesh checks.

I would suggest to make a better mesh first
Burak_1984 and tobiasS like this.
mAlletto is offline   Reply With Quote

Old   January 7, 2019, 15:36
Default
  #7
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
I attached a working turbine siting tutorial. I removed the terrain.stl in order that i could upload the zipped file
Attached Files
File Type: gz turbineSiting.tar.gz (8.9 KB, 7 views)
Burak_1984 likes this.
mAlletto is offline   Reply With Quote

Old   January 7, 2019, 15:46
Default
  #8
Member
 
tobiasS's Avatar
 
Hussam
Join Date: Aug 2017
Location: Germany
Posts: 32
Rep Power: 8
tobiasS is on a distinguished road
Hey Burak,
The problem is in your initial value of p.. In such solvers (with rho calculation) it cannot be zero.. So it has to be something like 1e5..
Regards..


Hussam
Burak_1984 likes this.
tobiasS is offline   Reply With Quote

Old   January 8, 2019, 12:48
Default
  #9
New Member
 
Burak
Join Date: Nov 2012
Posts: 14
Rep Power: 13
Burak_1984 is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
I attached a working turbine siting tutorial. I removed the terrain.stl in order that i could upload the zipped file

Hi Michael thanks for the effort! that was nice of you.


I will try to do a better job at mesh building next time.I never thought it would be the problem.


Now I have to go back and see where I was short in my files.
Burak_1984 is offline   Reply With Quote

Old   January 8, 2019, 12:50
Default
  #10
New Member
 
Burak
Join Date: Nov 2012
Posts: 14
Rep Power: 13
Burak_1984 is on a distinguished road
Quote:
Originally Posted by tobiasS View Post
Hey Burak,
The problem is in your initial value of p.. In such solvers (with rho calculation) it cannot be zero.. So it has to be something like 1e5..
Regards..


Hussam

Thank you Hussam I will check my example and try a small value of P instead of zero.Thanks!
Burak_1984 is offline   Reply With Quote

Old   January 8, 2019, 12:53
Default
  #11
Member
 
tobiasS's Avatar
 
Hussam
Join Date: Aug 2017
Location: Germany
Posts: 32
Rep Power: 8
tobiasS is on a distinguished road
Hey Burak,
You're welcome.. I would use just the real absolute pressure like 101300 Pa.. Because this value will be used to calculate the density..
tobiasS is offline   Reply With Quote

Old   January 9, 2019, 13:40
Default
  #12
New Member
 
Burak
Join Date: Nov 2012
Posts: 14
Rep Power: 13
Burak_1984 is on a distinguished road
Quote:
Originally Posted by tobiasS View Post
Hey Burak,
You're welcome.. I would use just the real absolute pressure like 101300 Pa.. Because this value will be used to calculate the density..

Hi


I added the pressures and it actually runs;


p_rgh in OF 1.7


From here I understand the vector quantity of g is negative so any increase in height is increasing the p_rgh value above P. For my case with 935m height this value (P-rgh) corresponds to 112524 Pa.I entered these values and ran the case.


Now I ran into trouble again see the example below Any help would be appricated.
Burak_1984 is offline   Reply With Quote

Old   January 9, 2019, 14:22
Default
  #13
New Member
 
Burak
Join Date: Nov 2012
Posts: 14
Rep Power: 13
Burak_1984 is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
I attached a working turbine siting tutorial. I removed the terrain.stl in order that i could upload the zipped file

Hi Michael


Sorry I don't want to be the needy type but in your attached example when I change the terrain value from 300K to 320K it seems to run very fast and crash at the 8th time step.I also changed my pressure values P to 101300 and the P_rgh to 113000 ish.Otherwise no change to your example.



I think its a problem of P_rgh calculation since it was the next step when the iteration gets canceled and GAMG solver is for solving such.The floating point error is usually an indication of division by zero or a very big number probably.


time step continuity errors : sum local goes to very big numbers why is that? I guess at the end it's division by zero but in which boundary condition I couldn't figure out.



Can you get a quick and give some insight again? Thanks a lot in advance.


Time = 0.7

smoothSolver: Solving for Ux, Initial residual = 0.657214783401, Final residual = 0.0291041043696, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.905530396866, Final residual = 0.057515992305, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.677630489646, Final residual = 0.0540805547183, No Iterations 1
smoothSolver: Solving for T, Initial residual = 0.195037331875, Final residual = 0.00973081249398, No Iterations 2
GAMG: Solving for p_rgh, Initial residual = 0.329531552134, Final residual = 0.00375071802158, No Iterations 1
time step continuity errors : sum local = 1.21035331236e+42, global = -2.63344335341e+41, cumulative = -2.63344335341e+41
smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.0905756200369, No Iterations 1
smoothSolver: Solving for k, Initial residual = 1, Final residual = 5.63098879497e-06, No Iterations 1
ExecutionTime = 6.29 s ClockTime = 7 s

Time = 0.8

smoothSolver: Solving for Ux, Initial residual = 2.03765961123e-05, Final residual = 1.29769010614e-06, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 4.11436268038e-06, Final residual = 5.96627015157e-08, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 5.02213173347e-06, Final residual = 4.94774532627e-07, No Iterations 1
smoothSolver: Solving for T, Initial residual = 0.117876455954, Final residual = 0.00190403878936, No Iterations 2
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
#4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
#8 Foam::fvMatrix<double>::solve() in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
#9 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
Floating point exception (core dumped)

Last edited by Burak_1984; January 9, 2019 at 16:48.
Burak_1984 is offline   Reply With Quote

Old   January 9, 2019, 17:31
Default
  #14
New Member
 
Burak
Join Date: Nov 2012
Posts: 14
Rep Power: 13
Burak_1984 is on a distinguished road
After some hours spent I am convinced that my T boundary conditions don't hold up.The uneven situation causes a massive blow up because I think it's not mitigated somehow.I tried using the inletoutlet boundary condition but it didn't help.


Could somebody give some ideas;

#include "include/initialConditions"

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
inlet
{
type uniformFixedValue;
uniformValue constant 300;
}

outlet
{

type uniformFixedValue;
uniformValue constant 300;
}

terrain
{
//type fixedGradient; //fixed heat flux b.c.
//type uniformFixedValue;
//uniformValue constant 310;


type uniformFixedValue;
uniformValue constant 310;

}

ground
{
type zerogradient;
}

#include "include/sideAndTopPatches"
}



UPDATE On this one: I managed to keep the run stable by changing some relaxation factors in the fvsolutions.What I did was use the 1/3 relaxation factors for p_rgh and U and T.It didn't converge yet but it doesn'T blow up as well and the timestep continuity errors are in check as well.

Last edited by Burak_1984; January 10, 2019 at 08:46.
Burak_1984 is offline   Reply With Quote

Reply

Tags
simplefoam


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
[Salome] Salome import "Cannot find file "points" in directory..." mismichael OpenFOAM Meshing & Mesh Conversion 5 June 22, 2019 02:56
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Turbine Siting Case, FOAM FATAL ERROR JMRF OpenFOAM Running, Solving & CFD 0 February 1, 2014 11:04
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 22:34.