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

Adding forcecoeffs file to the controldict is causing pimpleDyMfoam to crash.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2014, 20:01
Default Adding forcecoeffs file to the controldict is causing pimpleDyMfoam to crash.
  #1
Member
 
Pruthvi
Join Date: Feb 2014
Posts: 41
Rep Power: 12
pruthvi1991 is on a distinguished road
Hello all! I simulated an oscillating airfoil using pimpleDyMfoam and got some results. Later I added a forcecoeffs file and ran it again to measure forces and the solution is crashing.

I checked the log files and it seems like the forcecoeffs is altering the initial conditions of the spring. I gave anchor(0,0,0) , refattachment(0,0,0), velocity(0, 0.8, 0). In the log.pimpleDyMfoam file, it shows the initial spring length as (0, 9e-5,0) when it should actually be (0,0,0).

Here is my forcecoeffs file. At the end of the controldict file I added #include "forceCoeffs"

forceCoeffs1
{
type forceCoeffs;
// type forces;

functionObjectLibs ( "libforces.so" );

outputControl timeStep;
timeInterval 1;

log yes;

patches ( wing );
pName p;
UName U;
rhoName rhoInf; // Indicates incompressible
log true;
rhoInf 1; // Redundant for incompressible
liftDir (0 0 1);
dragDir (1 0 0);
CofR (0 0 0); // Axle midpoint on ground
pitchAxis (0 1 0);
magUInf 0;
lRef 0.001; // Wheelbase length
Aref 0.002; // Estimated

// binData
// {
// nBin 20; // output data into 20 bins
// direction (1 0 0); // bin direction
// cumulative yes;
// }
}

I uploaded the log.pimpleDyMfoam and dynamicMeshDict files. Please help me guys.
Attached Files
File Type: txt pimple.txt (6.0 KB, 14 views)
File Type: txt dynamicMeshDict.txt (2.2 KB, 15 views)
pruthvi1991 is offline   Reply With Quote

Old   August 11, 2014, 03:38
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Did you put your include statement like this?

functions
{
#include "forceCoeffs"
}

It has to be inside the functions subdict.

Regards,
Tom
tomf is offline   Reply With Quote

Old   August 11, 2014, 14:16
Default
  #3
Member
 
Pruthvi
Join Date: Feb 2014
Posts: 41
Rep Power: 12
pruthvi1991 is on a distinguished road
Quote:
Originally Posted by tomf View Post
Did you put your include statement like this?

functions
{
#include "forceCoeffs"
}

It has to be inside the functions subdict.

Regards,
Tom
Hey Tom ! Thanks for the reply. I added it in the functions subdict. Yesterday I modified my controldict file by adding the lib.openFOAM.so. I still get the error. I'm uploading the new controldict file and log file. Please take a look.
Attached Files
File Type: txt pimple.txt (6.0 KB, 12 views)
File Type: txt controlDict.txt (1.3 KB, 55 views)
pruthvi1991 is offline   Reply With Quote

Old   August 11, 2014, 16:56
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good evening,

I am wondering, whether it is because magUInf is set to zero, i.e. when computing the force coefficient based on the magnitude of the incident velocity, you are likely to divide by zero.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 13, 2014, 05:42
Default
  #5
Member
 
Pruthvi
Join Date: Feb 2014
Posts: 41
Rep Power: 12
pruthvi1991 is on a distinguished road
Hello ! I tried changing the magUInf to non-zero values and it is still crashing. The unexpected thing is that when I add the forceCoeffs file it is changing the initial conditions of the spring. The anchor is supposed to be (0,0,0) but its showing a non-zero value instead.
pruthvi1991 is offline   Reply With Quote

Old   August 13, 2014, 05:54
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Just wondering what would happen if you run the simulation for a few (say 10) time steps with the functions section commented out and than uncomment this section. I wonder if there is something special about just the first time step that may cause this, but it looks a bit strange indeed.

Regards,
Tom
tomf is offline   Reply With Quote

Old   August 14, 2014, 21:56
Default
  #7
Member
 
Pruthvi
Join Date: Feb 2014
Posts: 41
Rep Power: 12
pruthvi1991 is on a distinguished road
Hey I tried your suggestion and its still crashing. Could it be my bcs ? I gave a zero gradient on all four sides. There is no ambient velocity. The flatplate is plunging in still air. I added the following two lines to the fvSolutions file
PIMPLE
{
correctPhi yes;
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
pRefCell 0; // These two were added
pRefValue 0;
//
}

Is it possible that the pRefValue shouldnt be zero ?
pruthvi1991 is offline   Reply With Quote

Old   August 15, 2014, 01:59
Default
  #8
Member
 
Pruthvi
Join Date: Feb 2014
Posts: 41
Rep Power: 12
pruthvi1991 is on a distinguished road
I just found out that the wingMotion case is also crashing when I insert the forceCoeffs file. I would really appreciate if someone can try it and check if its a bug in pimpleDyMFoam. I was able to extract data from pimpleFoam but not from pimpleDyMFoam.
pruthvi1991 is offline   Reply With Quote

Old   August 20, 2014, 04:19
Default
  #9
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi, just did the test with the tutorial. It runs perfectly fine when magUInf is non-zero, so I cannot reproduce your error.
tomf is offline   Reply With Quote

Old   August 20, 2014, 11:39
Default
  #10
Member
 
Pruthvi
Join Date: Feb 2014
Posts: 41
Rep Power: 12
pruthvi1991 is on a distinguished road
Hey Tom ! Thanks for your time. How long did you run the simulation? When I ran the test case, it went on for a while before crashing. Could you upload your log file please? If I confirm that your simulation ran fine, I will reinstall openfoam230.
pruthvi1991 is offline   Reply With Quote

Old   August 25, 2014, 04:31
Default
  #11
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi

It ran for the entire time a set in the controlDict for the case. I had to rerun the case to get the log since I deleted it last time. You can download the log here:

http://we.tl/CD48eDLusI

to get the log back:
tar xzf log.tgz

Regards,
Tom
tomf is offline   Reply With Quote

Old   October 6, 2014, 23:03
Default
  #12
Member
 
Pruthvi
Join Date: Feb 2014
Posts: 41
Rep Power: 12
pruthvi1991 is on a distinguished road
Hello Tom! I checked your log file. Thanks a lot. I was able to run the simulations successfully if I choose 3 cores. The solution is crasing for any other number on my laptop. My laptop has 4 cores and 8 threads. I read about it online. It is called a race condition. Do you know what could be causing it?
pruthvi1991 is offline   Reply With Quote

Old   October 10, 2014, 04:56
Default
  #13
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
I will not be able to help you with that issue I'm afraid. Sounds like a hardware/software compatibility issue, or maybe related to compiling? Really have no clue. Good luck.

Tom
tomf is offline   Reply With Quote

Old   April 13, 2015, 01:46
Default Solved!
  #14
Member
 
Pruthvi
Join Date: Feb 2014
Posts: 41
Rep Power: 12
pruthvi1991 is on a distinguished road
Hello everybody!

This is a bug in OpenFOAM code and it has been resolved by commit 5179e8ea3bcb24cdb6ad0ac96764c0d562a55945 .

Thanks for the help.
pruthvi1991 is offline   Reply With Quote

Reply

Tags
dynamicmesh, openfoam 2.3.0, pimpledymfoam

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
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


All times are GMT -4. The time now is 09:52.