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

Modified tutorial 3D to 2D; pimpleDyMFoam crashing

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

Like Tree1Likes
  • 1 Post By nimasam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 24, 2013, 03:13
Default Modified tutorial 3D to 2D; pimpleDyMFoam crashing
  #1
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
Hi everyone.
I'm very much an OpenFOAM beginner, so advice here would really be appreciated.

With a lot of effort, I repurposed the tutorial incompressible/pimpleDyMFoam/propeller to model a wind turbine in 2D. Or at least I've attempted to.
After running snappyHexMesh, the checkMesh utility gives me these errors:
Code:
...

 ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
...
 ***Number of edges not aligned with or perpendicular to non-empty directions: 102515
...
In addition (or perhaps, as a result of this), the pimpleDyMFoam solver crashes almost immediately on starting with a floating point exception.

My case files are attached for your perusal.
Thanks in advance for any help!
Attached Files
File Type: zip VAWT2D.zip (41.5 KB, 32 views)
Boloar is offline   Reply With Quote

Old   June 24, 2013, 08:11
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
Dear anand
you are going to solve a 2D problem, so your mesh should have just one cell thick,
after snappyHexMesh, you should use extrudeMesh to create a true 2D geometry
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   June 25, 2013, 06:37
Question Mesh is proper 2D! pimpleDyMFoam still crashing
  #3
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
Quote:
Originally Posted by nimasam View Post
after snappyHexMesh, you should use extrudeMesh to create a true 2D geometry
Hi nimasam,
Thanks for that, I had not realized that. The mesh is now correct.

I am still unable to figure out why pimpleDyMFoam keeps crashing, though.

I have redone my case, and borrowed several of the boundary and initial conditions from the incompressible/pimpleDyMFoam/wingMotion tutorials. It keeps crashing almost immediately, giving the error below. I'm sure it has to do with the initial conditions, since it crashes immediately after reading k, but all of them seem valid to me ...

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0-5be49240882f
Exec   : pimpleDyMFoam
Date   : Jun 25 2013
Time   : 15:00:48
Host   : "fedorael"
PID    : 9244
Case   : wingMotion/pimpleDyMFoam
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone AMIsurface_z
Reading field p

AMI: Creating addressing and weights between 1536 source faces and 1536 target faces
AMI: Patch source weights min/max/average = 0.04771037154, 1, 0.9089661396
AMI: Patch target weights min/max/average = 0, 1.632719212, 0.9069578828
Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model kOmegaSST
bounding k, min: 0 max: 37 average: 37
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  
 at sigaction.c:?
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  void Foam::divide<Foam::fvPatchField>(Foam::FieldField<Foam::fvPatchField, double>&, Foam::FieldField<Foam::fvPatchField, double> const&, Foam::FieldField<Foam::fvPatchField, double> const&) at ??:?
#5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#6  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::average<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
#7  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::average<double>(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) at ??:?
#8  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::average<double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#9  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::average<double>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#10  Foam::bound(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensioned<double> const&) at ??:?
#11  Foam::incompressible::RASModels::kOmegaSST::kOmegaSST(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&) at ??:?
#12  Foam::incompressible::RASModel::adddictionaryConstructorToTable<Foam::incompressible::RASModels::kOmegaSST>::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) at ??:?
#13  Foam::incompressible::RASModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) at ??:?
#14  Foam::incompressible::turbulenceModel::addturbulenceModelConstructorToTable<Foam::incompressible::RASModel>::NewturbulenceModel(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) at ??:?
#15  Foam::incompressible::turbulenceModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) at ??:?
#16  
 at ??:?
#17  __libc_start_main at ??:?
#18  
 at ??:?
Floating point exception (core dumped)
Any idea how to fix this? Case files are attached.
Attached Files
File Type: zip VAWT2D.zip (38.6 KB, 33 views)

Last edited by Boloar; June 26, 2013 at 02:48.
Boloar is offline   Reply With Quote

Old   June 27, 2013, 12:29
Default
  #4
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
Anand,

Have you tried to clean your "/constant/polyMesh/" folder? Maybe you still have some excess files in that folder from your previous runs.

Best,

Kilroy
kilroy is offline   Reply With Quote

Old   June 28, 2013, 01:40
Default
  #5
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
Hi Kilroy,

I've removed any and all irrelevant files, to the best of my knowledge. Meshing is perfect, as far as I can tell, and pimpleDyMFoam still crashes. No previous runs - I haven't even got one successful run yet, lol
Boloar is offline   Reply With Quote

Old   June 29, 2013, 02:46
Question
  #6
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
I've tried changing the relaxation factors, the solvers, the schemes, the initial condition values, anything I could.
Nothing works, it keeps getting a floating point exception in exactly the same spot: immediately after reading k. The bounding value of k goes from 0 to 37, and evidently it doesn't like that zero, according to the error report.
I have NO idea how to fix this. Help will be deeply appreciated.
Boloar is offline   Reply With Quote

Old   June 29, 2013, 02:48
Default
  #7
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13
kilroy is on a distinguished road
I will try to look into your case on Monday and let you know if I can some errors. Have a nice weekend!
kilroy is offline   Reply With Quote

Old   June 29, 2013, 02:55
Default
  #8
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
Thank you Kilroy!

Background info on the case: I modified the incompressible/pimpleDyMFoam/propeller 3D tutorial into a 2D form with my own STL files, to take advantage of the AMI implementation, and it seems correct.
Then I intended to use that AMI-enabled mesh with the pimpleDyMFoam/wingMotion airflow conditions - but it keeps crashing.
It seemed plausible in concept, I hope it can be resolved.

*****************
UPDATE:

Okay, so maybe I'm stupid. I had defined the AMI regions (type cyclicAMI;) in the initial conditions 0/include/AMI, but I foolishly forgot to assign a value to them i.e. value $internalField. Now the solver goes past that stage and crashes slightly later with exactly the same error.

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0-5be49240882f
Exec   : pimpleDyMFoam
Date   : Jun 29 2013
Time   : 15:51:28
Host   : "fedorael"
PID    : 14108
Case   : wingMotion/pimpleDyMFoam
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone AMIsurface_z
Reading field p

Reading field U

Reading/calculating face flux field phi

AMI: Creating addressing and weights between 1536 source faces and 1536 target faces
AMI: Patch source weights min/max/average = 0.04771037154, 1, 0.9089661396
AMI: Patch target weights min/max/average = 0, 1.632719212, 0.9069578828
Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
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;
    b1              1;
    c1              10;
    F3              false;
}

Reading field rAU if present

Creating finite volume options
No finite volume options present


PIMPLE: no residual control data found. Calculations will employ 2 corrector loops


Starting time loop

Courant Number mean: 12.53463609 max: 353.4174513
deltaT = 0.00025
Time = 0.00025

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.00025 transformation: ((0 0 0) (0.9999996916 (0 0 0.0007853980827)))
AMI: Creating addressing and weights between 1536 source faces and 1536 target faces
AMI: Patch source weights min/max/average = 0.06740513704, 2.343027326, 1.197313318
AMI: Patch target weights min/max/average = 0, 2.317230511, 1.190243699
GAMG:  Solving for pcorr, Initial residual = 1, Final residual = 0.01249677062, No Iterations 7
time step continuity errors : sum local = 1.535166181e-06, global = -2.375415942e-08, cumulative = -2.375415942e-08
PIMPLE: iteration 1
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  
 at sigaction.c:?
#3  Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at ??:?
#4  void Foam::divide<Foam::fvPatchField>(Foam::FieldField<Foam::fvPatchField, double>&, double const&, Foam::FieldField<Foam::fvPatchField, double> const&) at ??:?
#5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#6  
 at ??:?
#7  __libc_start_main at ??:?
#8  
 at ??:?
Floating point exception (core dumped)

Last edited by Boloar; June 29, 2013 at 07:28.
Boloar is offline   Reply With Quote

Old   July 3, 2013, 04:50
Default
  #9
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
After my minor breakthrough about the initial conditions file, I haven't made any progress ... any luck, Kilroy? (or anyone else who may have taken a look at the case?)

For the life of me I can't figure out where that division error is coming from.
Boloar is offline   Reply With Quote

Old   July 3, 2013, 05:28
Default
  #10
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
Dear annad
problem is somewhere else , it returns to your poor AMI BC,
now solver is going to map to a face with weight 0 and its not possible ,
so its better that you work on your meshing and create AMI with weighting around 1
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   July 3, 2013, 06:16
Default
  #11
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
Hi nimasam,
I think I see what you mean. But I'm not sure how to fix that ... Do I need to increase the snappyHexMesh refinement levels? Change the AMI tolerance or rotational velocity?
I tried to copy the AMI setup of the propeller tutorial as closely as possible.
Boloar is offline   Reply With Quote

Old   July 3, 2013, 06:21
Default
  #12
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
i think you should work on snappyHexMesh, to create much more uniform AMI faces,
did you use stl file to create cylinder? or you may want to use edgeSnappFeature, to have better edge resolution
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   July 3, 2013, 06:28
Default
  #13
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
Quote:
Originally Posted by nimasam View Post
i think you should work on snappyHexMesh, to create much more uniform AMI faces,
did you use stl file to create cylinder? or you may want to use edgeSnappFeature, to have better edge resolution
I've increased the "feature edge refinement" in sHM from 2 levels to 4. Yes, I used a cylinder STL file to define the AMI where it intersects with the blockMesh ... would it work better if I implemented it as a "searchableCylinder" instead?
Could you elaborate a little bit on the edgeSnappFeature you just mentioned?
Boloar is offline   Reply With Quote

Old   July 3, 2013, 06:45
Default propeller
  #14
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
enjoy it
Attached Files
File Type: gz propeller.tar.gz (29.1 KB, 74 views)
Boloar likes this.
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   July 3, 2013, 07:00
Default
  #15
Member
 
Anand Lobo
Join Date: Jun 2013
Posts: 56
Rep Power: 12
Boloar is on a distinguished road
Quote:
Originally Posted by nimasam View Post
enjoy it
You, sir, are a God among men. I honestly would never have thought to reduce the sHM refinement
Thank you!
Boloar 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
Modified the motorBike tutorial, getting very high drag ben1793 OpenFOAM Running, Solving & CFD 4 August 16, 2013 03:25
pimpleDyMFoam issue giovanidiniz OpenFOAM Running, Solving & CFD 1 July 5, 2013 08:25
Problem on Fluent Tutorial: Horizontal Film Boilig Feng FLUENT 2 April 13, 2013 06:34
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread wyldckat OpenFOAM Installation 2 July 11, 2012 17:01
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52


All times are GMT -4. The time now is 12:39.