CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Strange/unphysical results with any ddtSchemes other than steadyState (https://www.cfd-online.com/Forums/openfoam-solving/140092-strange-unphysical-results-any-ddtschemes-other-than-steadystate.html)

MichaelD August 7, 2014 12:14

Strange/unphysical results with any ddtSchemes other than steadyState
 
Hi everyone,

I'm relatively new to openFoam and CFD in general, so I'm using a crossflow cylinder simulation as an introduction/validation case, by creating my own mesh and modifying the motorcycle tutorial.

So far I've set ddtSchemes to steadyState (in the system/fvSchemes file) to do the simulations, but I'd like to change it and see how/whether it impacts the results.

However, using anything other than steadyState causes the simulation behave strangely: After 500 iterations, the pressure and velocity have converged to what looks like the inviscid solution. The other variables are behaving unexpectedly too (see images). I've tried using backward, crankNicholson and euler for ddtSchemes so far.

I've tarballed the case where I used euler and included the final output file:
https://drive.google.com/file/d/0ByI...it?usp=sharing


(system and 0 file also uploaded in their own tarball):
https://drive.google.com/file/d/0ByI...it?usp=sharing



What am I missing? Any help is appreciated.

http://i.imgur.com/megmnOm.png?1
http://i.imgur.com/svQxgdx.png?1
http://i.imgur.com/j6u1Y2F.png?1
http://i.imgur.com/71hl9dn.png?1
http://i.imgur.com/9Rzy1iD.png?1

RodriguezFatz August 8, 2014 04:00

What solver did you use?

MichaelD August 8, 2014 07:29

Hi Philipp,

I used pisoFoam (run in parallel) for all simulations. I've also tried using pimpleFoam with the backward scheme, with the same result.

RodriguezFatz August 8, 2014 07:31

Ok. Do you expect vortex shredding behind the cylinder? What's the diameter and what is the viscosity? Velocity is 2m/s? How large is the time step?

MichaelD August 8, 2014 10:24

The diameter of the cylinder is 2m, the viscosity (nu) is 10^-6, and the inlet velocity is 1 m/s. So the reynolds number should be 2*10^6. Since the turbulent vortex sheet is apparently established at Re>3.5*10^6, I didn't expect any vortex shedding, though maybe it's close enough for the flow to become unstable? I'm not a 100% sure on this.

The time step was 10^-5.

RodriguezFatz August 11, 2014 02:02

Quote:

Originally Posted by MichaelD (Post 505062)
Since the turbulent vortex sheet is apparently established at Re>3.5*10^6, I didn't expect any vortex shedding

I think you missinterpreted the turbulent regime. The cylinder has a vortex street for most relevant Reynolds numbers.
Look:
http://www.thermopedia.com/content/1247/

MichaelD August 11, 2014 04:17

Ah, thanks for the info! It's always good to know more about the flow.

I'm still unsure what to do about the original problem, though. Any recommendations for what I can do to figure out what's going on?

RodriguezFatz August 11, 2014 04:22

The steady state simulation doesn't make any sense, since this is an unsteady problem. The unsteady simulations will take some time to develop the vortex street from initial conditions. Unless the vortex street is there and it doesnt diverge, you should not care about the residuals.
I would
1) estimate the shedding frequency "f" using St=0.2 -> http://en.wikipedia.org/wiki/Vortex_shedding
2) use some time step, let's say of 1/20 of the shedding time "T=1/f"
3) let the simulation run until you see the vorticies
If you still have problems then, post again.

MichaelD August 11, 2014 06:41

So if I'm understanding you correctly, you think the issue might be a matter of run time convergence?

I've set up a simulation with dt=0.001 (giving a CFL max of 0.35), which should give me coverage up to St=100, given your recommendations. The current end-time is 20 secs, or 8 vortex shedding periods at St=0.2, but I'll increase it if nothing changes.

I'll let you know how it goes; this will take a while to simulate. I might set up a "lighter" mesh as well, so I can try some different things while this simulates.

Thanks for the help!

RodriguezFatz August 11, 2014 06:45

You didn't use St correctly. "St" is a dimensionless value. It is not the frequency!
Look at the link I posted to find the definition of St. Use it to calculate "f". Then calculate "T=1/f" and set your time step low enough to capture that frequency. As far as I understand it you don't need to care that much about CFL if you use a implicit time integration so I would recommend to use backward Euler if CFL is a problem with your time step size.

MichaelD August 11, 2014 07:45

oops, you're right, somehow mixed up U and D and messed up my calculation of T for St=0.2. Should be 10s not 2.5s :o

Using euler over an implicit formulation seemed like the safer option, since I'm a bit unsure what the limitations will be for the implicit formulation. I'll read up on it a bit, and take it from there.

MichaelD August 12, 2014 05:41

Okay so, here's how things are going so far:

In the euler simulation the pressure started diverging around t=6, so I scrapped that one for now.

I started another simulation using the backward formulation and pimpleFoam with a courant limiter of Co=10. It's running, but around t=6 it's running a very low timestep dt=0.002.

I created a slightly coarser/simpler mesh using snappyHexMesh and ran it using backward/pimpleFoam, and that one seems to be running fine, currently t=15s and no issues.

As far as vortices goes, I've yet to observe any as the wake is still forming, even in the coarse simulation at t= 15s. Seems a bit long, maybe?

None of the simulations are displaying behaviour like the original post, so I guess it's resolved! I suppose it was just a matter of more iterations after all.

So, thanks for all the help Philipp! If I may pester you one final time, if you have any pointers on where I should be reading up on how to optimise the speed of my simulation (rapid convergence, time-stepping etc), it would be much appreciated :)

RodriguezFatz August 12, 2014 06:53

The von Karman street takes some time to develope. It really depends on the intial settings. I often had a "steady state" wake that took a while to build up, which really slowly began to swing and eventually broke up for the vortex street.

You could take some faster and numerically worse settings for the initialization (wake building and all that stuff) and go to 2nd order when you see vorticies.


All times are GMT -4. The time now is 07:01.