CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   pimpleDyMfoam simulation keeps blowing up (https://www.cfd-online.com/Forums/openfoam/99920-pimpledymfoam-simulation-keeps-blowing-up.html)

lovecraft22 April 16, 2012 06:08

pimpleDyMfoam simulation keeps blowing up
 
1 Attachment(s)
Hi all;
I'm running a pimpleDyMFoam simulation and it keeps blowing up.
Even reducing the time step down to 1e-5 does not solve the problem.

Code:

Courant Number mean: 5.46684e+95 max: 8.98336e+97
Time = 0.02416

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.02416 transformation: ((0 0 0) (0.997121 (0 0 0.075828)))
PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 0.790411, Final residual = 0.0773137, No Iterations 13
smoothSolver:  Solving for Uy, Initial residual = 0.736195, Final residual = 0.0664809, No Iterations 15
GAMG:  Solving for p, Initial residual = 0.991861, Final residual = 0.00944463, No Iterations 3
time step continuity errors : sum local = 1.18585e+93, global = -2.66584e+77, cumulative = 1.75555e+77
PIMPLE: iteration 2
smoothSolver:  Solving for Ux, Initial residual = 0.763113, Final residual = 0.07555, No Iterations 53
smoothSolver:  Solving for Uy, Initial residual = 0.721429, Final residual = 0.0720906, No Iterations 255
GAMG:  Solving for p, Initial residual = 0.930911, Final residual = 0.00681328, No Iterations 5
time step continuity errors : sum local = 3.0917e+94, global = 8.06608e+78, cumulative = 8.24164e+78
PIMPLE: iteration 3
DILUPBiCG:  Solving for Ux, Initial residual = 0.763528, Final residual = 7.71705e-07, No Iterations 75
DILUPBiCG:  Solving for Uy, Initial residual = 0.750098, Final residual = 8.75581e-07, No Iterations 74
GAMG:  Solving for p, Initial residual = 0.982765, Final residual = 6.63145e-07, No Iterations 19
time step continuity errors : sum local = 1.39295e+91, global = -2.71812e+80, cumulative = -2.6357e+80
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Uninterpreted:
#3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#5  Foam::fvMatrix<double>::solve() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#6  Foam::incompressible::RASModels::kOmegaSST::correct() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#7 
 in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/pimpleDyMFoam"
#8  __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#9 
 in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/pimpleDyMFoam"

My fvScehemes and fvSolutions are attached. I slightly changed them from the ones you can get from the propeller tutorial as I would like to use a k-omega model. Don't know if in doing so I messed them up…

Any help would be greatly appreciated.

linnemann April 16, 2012 06:26

Hi

I would suggest doing the following until it stops blowing up.

Change to upwind on U.

And relax the components by 0.5.

If it stops blowing up you can then try to switch to higher order schemes and decrease the relaxation.

lovecraft22 April 16, 2012 06:32

Thank you Linnemann.

Relax the components by 0.5 means that I need this in my fvSolutions:
Code:

relaxationFactors
{
    "(U|k|epsilon).*"  1;
}

correct?

About the rest, what do you mean with change to upwind on U and switch to hig order schemes?

Thank you again for your help!

linnemann April 16, 2012 06:58

yes

relaxationFactors
{
"(p|U|k|epsilon).*" 0.5;
}

in fvSolutions

and

div(phi,U) Gauss upwind;//

in fvSchemes

you are using linearUpwind which is a higher order scheme and thus inherently more unstable.

lovecraft22 April 16, 2012 09:42

Thank you linnemann, unfortunately had no luck with your tips…
First of all I increased the time step from 1e-5 to 1e-4 and my simulation blew up at time 0.0266.
So I changed this line I had in my fvSolution:
Code:

    "(U|k|epsilon).*"  1;
to this:
Code:

    "(p|U|k|omega).*"  1;
as I'm using the k-omega model and the simulation blew up again at 0.0266.
So I changed the line to this:

Code:

    "(p|U|k|omega).*"  0.5;
but again I got a blew up, this time at 0.0414, so slightly better.

So I changed these lines in my fvSchemes:
Code:

divSchemes
{
    default        none;
  //  div(phi,U)      Gauss upwind;
    div(phi,U)      Gauss linearUpwind grad(U);
    div(phi,k)      Gauss upwind;
    div(phi,omega) Gauss upwind;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
}

to these:

Code:

divSchemes
{
    default        none;
    div(phi,U)      Gauss upwind;
//    div(phi,U)      Gauss linearUpwind grad(U);
    div(phi,k)      Gauss upwind;
    div(phi,omega) Gauss upwind;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
}

with no result.

At this time I moved back to a time step of 1e-5 to reduce the Courant Number but the simulation blew up at 0.026…

What do you think?

Thank again.

linnemann April 16, 2012 09:58

2 Attachment(s)
Try with transientSimpleDyMFoam

with this fvSolution file.

lovecraft22 April 16, 2012 10:21

Thank you. Do I need to compile it?

linnemann April 16, 2012 10:25

Yes you have to

lovecraft22 April 16, 2012 10:26

Thank you!
I'll see what I can do!

lovecraft22 April 16, 2012 10:50

By the way, what's the difference between this and the one that comes with openFoam?

lovecraft22 April 16, 2012 19:08

Actually, my geometry is quite a simple one: just a 2D cube… How comes it cannot be solved? I mean, what can you solve with the original pimpleDyMFoam then?

linnemann April 17, 2012 02:37

Hi

If it is that simple I suggest you upload it so we can have a look at your setup.

If its too big to fit here use Dropbox with a public link or a similar file sharing method.

lovecraft22 April 17, 2012 05:46

1 Attachment(s)
Thank you linnemann.
Here's my case.

Regards

JulytoNovember April 17, 2012 13:03

Quote:

Originally Posted by linnemann (Post 354884)
Try with transientSimpleDyMFoam

with this fvSolution file.

Excuse me Linnemann, could you please explain the differences between pimpleDyMFoam and transientSimpleDyMFoam?

wyldckat April 17, 2012 16:26

Greetings to all!

In case Linnemann doesn't see the question about the differences between the two solvers, here's what I know:
  • PIMPLE is a hybrid algorithm that uses PISO and SIMPLE (I think it's PISO for outer loops and SIMPLE for inner loops). Is mostly used in OpenFOAM for transient simulations.
  • SIMPLE is an algorithm that can also do transient simulations, but not very used for this in OpenFOAM.
SIMPLE and PISO in OpenFOAM are explained here:
For more about these algorithms, you'll have to read up on CFD literature ;)


Best regards,
Bruno

calim_cfd April 17, 2012 16:49

just a thought... you know your running an incompressible solver and your using a reference pressure of 1atm

Code:

pRefPoint (0.1 0.1 -0.005);
    pRefValue 1e5;

have you handled all the other variables to adjust to this value? :eek:

linnemann April 17, 2012 16:58

Hi lovecraft

Had a look at your case and it looks like you haven't (not to be rude) understood the setup involving rotating stuff.

If you follow the tutorial

/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D

I think you will get a better understanding of the whole setup involving rotating parts.

Back to your case.

I had to split it up into two meshes and then merge them back together and attach them using AMI's. You cant have a moving mesh where you only have one mesh and a zone. If you want to do it this way you should use the steady MRF approach.

Also a lot of your BC's where wrong for such a case.
Here is a nice little animation of it running.

http://dl.dropbox.com/u/15968063/output.avi

and also a link to the case that works.

http://dl.dropbox.com/u/15968063/cubo.tar.gz

And to follow up on the difference transientSimpleDyMFoam has some hard-coded stuff that makes it more stable, but it should be able to tweak pimpleDyMFoam to have a similar stability.

lovecraft22 April 17, 2012 18:10

Thank you a lot linnemann, that's really great! I'll have a look at the setup tomorrow. Could you also explain me what commands you ran?

Thanks again!

lovecraft22 April 17, 2012 19:07

I did some digging around and also looking at the case you uploaded I think I understood this:

1. You need to create an interface between the rotating and the stationary meshes. In my case it was a cylinder. This is the AMI (Arbitrary - btw, why "arbitrary??" - Mesh Interface);
2. You need to mesh the two regions separately, making sure you have the same cell dimensions on the AMI;
3. Merge the two meshes using mergeMesh on the running case and then run it.

I'll dig deeply on the propeller tutorial tomorrow.
What I did wrong (and I'm sorry for having posted here and on another discussion my wrong conclusions about that…) was that I only set the rotating region as a zone. This is what I usually do for the MRF and, at this point, I hope that at least is correct…

Looking forward to try an run it as I'm getting really excited about that!

Anyway thanks anybody for you help and sorry for my mistakes…

kid April 18, 2012 06:59

@linnemann @lore
http://dl.dropbox.com/u/70019943/roCube.tar.gz

Hello linnemann, appreciate your effort on pimpleDyFoam above.
plz find my case folder with implementation of rotating cube.
* I have only done the meshing of rotor stator inside rocube/Mesh folder.
* the next step would be to merge rotor-Mesh and stator-Mesh!!!

How to go about it?

Note: Still the case is not fully modeled, so most of the BC files are missing.


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