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

Steady State Multiphase Simulation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2020, 06:49
Default Steady State Multiphase Simulation
  #1
New Member
 
Mike Worth
Join Date: Apr 2020
Posts: 7
Rep Power: 2
Mike.Worth is on a distinguished road
I'm trying to simulate some flow where the geometry is quite different, but the physics is pretty similar to the capillaryRise tutorial. I'm using the interIsoFoam solver in v1912.

I'm after a steady-state solution, but am suffering from oscillations driven by the initial energy in the system. As far as I can tell, the tutorial case suffers from the same issue. Is there a way to damp the solution or similar to remove this 'sloshing energy' so that the solution tends towards the minimum energy (steady state) condition?

I've tried adding velocityDampingConstraint to my fvOptions file, (which is being read as it gives errors if misspelled), but I don't actually see the velocity being limited. This isn't an ideal way to make my simulation work, but would at least enable me to get an initial 'sloshing-free' surface driven condition.

I find it odd that there don't seem to be any steady-state multiphase solvers. Is this because there is a workaround where (for example) the fvSolution can be adjusted to give pseudo-steady-state without requiring a duplicate solver?

Many thanks,
Mike
Mike.Worth is offline   Reply With Quote

Old   May 11, 2020, 18:32
Default
  #2
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 583
Rep Power: 5
HPE is on a distinguished road
Hi,

- Might interFoam with the local time-stepping (LTS) support help?

https://openfoam.org/release/2-0-0/steady-state-vof/

https://github.com/OpenFOAM/OpenFOAM...6d5bee6f131c7a

Code:
LTS is selected by the ddt scheme e.g. in the
tutorials/multiphase/interFoam/ras/DTCHull case:

ddtSchemes
{
    default         localEuler rDeltaT;
}
HPE is online now   Reply With Quote

Old   May 12, 2020, 10:21
Default
  #3
New Member
 
Mike Worth
Join Date: Apr 2020
Posts: 7
Rep Power: 2
Mike.Worth is on a distinguished road
Thanks for that pointer; I think it's going to form the core of what I need. I'm not quite sure how to make it work though.

I had a quick look at the DTCHull tutorial, but in the interests of reducing solve times decided that a simpler case would be a better way to figure it all out. I copied the controlDict, fvSchemes & fvSolution files from DCTHull into capillaryRise, figuring that should result in a steady-state capillary meniscus that I could verify was working as expected. Unfortunately that just runs for 4000 steps without ever seeming to settle into a stable interface - there is constant rippling with a significant velocity.

Are there some controls that I can use to push this towards stability? I've tried playing with relaxation factors, but that doesn't seem to converge towards a stable meniscus height - there is oscillation up and down.

Thanks,
Mike
Mike.Worth is offline   Reply With Quote

Old   May 13, 2020, 04:49
Default
  #4
New Member
 
Mike Worth
Join Date: Apr 2020
Posts: 7
Rep Power: 2
Mike.Worth is on a distinguished road
I've had a closer look at the LTS concept, and as far as I can tell there are implementations out there (e.g. 1,2) that do work properly for transient simulation. They are aimed at reducing computational effort by being coarser with timesteps on some areas of the domain.

While LTS may help me save effort, it will not in and of itself lead to a steady state solution. I need to somehow damp out some energy from the system to prevent it oscillating for ever. An analogy would be trying to find the steady state solution of a pendulum (stationary, at the bottom) using a transient solver (which would swing back and forth for ever).

I mucked about with under-relaxation to no avail. Turns out that only changes things within a timestep - it is ignored for the last simple loop in each timestep. Is there a way to do under-relaxation on the scale of timesteps themselves? Obviously this violates the laws of physics, but ought to help converge towards a steady answer. I could then do a final step without it to ensure that the answer is physical.

If I want a proper steady state version of inter(Iso)Foam, is my only option to delve into the C++ and try to combine the relevant parts of inter(Iso)Foam with simpleFoam?

Thanks,
Mike

Last edited by Mike.Worth; May 13, 2020 at 08:07. Reason: Added comments about under-relaxation
Mike.Worth is offline   Reply With Quote

Old   May 13, 2020, 16:33
Default
  #5
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 583
Rep Power: 5
HPE is on a distinguished road
Hi

- Before considering your questions regarding the steady-state modifications, is there any chance to consider to use a transient solver (e.g. interIsoFoam), and do the time-averaging of the field of interest by using fieldAverage function object to obtain a steady-state picture of the flow? Or would this be too naive?
- I have asked a friend more knowledgeable in this regard, the response was:
"Any solver that can handle LTS time scheme can be run as steady state. InterFoam is one.
Not sure about the other interXXXFoam solvers.
The handling of LTS needs to be accounted on the top level solver"

Hope this helps.
HPE is online now   Reply With Quote

Old   May 19, 2020, 03:39
Default
  #6
New Member
 
Mike Worth
Join Date: Apr 2020
Posts: 7
Rep Power: 2
Mike.Worth is on a distinguished road
Thanks for that; I've poked around a little more, and it appears that a lot of my sloshing was coming from numeric errors - I've tightened up all of my residual limits and it provides a much more stable solution that appears to converge to a stable state.

Is there a mechanism by which I can make interFoam terminate once it's outputs stop changing? As a fundamentally transient solver I can't see how to do this, butI'd like to check before I start writing scripts to manually look for it and terminate the solver.
Mike.Worth is offline   Reply With Quote

Old   May 19, 2020, 04:43
Default
  #7
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 583
Rep Power: 5
HPE is on a distinguished road
Hi,

- I think you can use `runTimeControl` FO: https://www.openfoam.com/documentati...e-control.html
HPE is online now   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
User Coding in steady state simulation nalamyogesh STAR-CCM+ 1 February 1, 2019 18:43
Domain Reference Pressure and mass flow inlet boundary AdidaKK CFX 75 August 20, 2018 05:37
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 00:58
Convergence in steady state simulations vs transient ones cardioCFD CFX 5 January 21, 2018 10:59
STeady State Simulation prashantthaker208 FLUENT 0 March 4, 2014 00:48


All times are GMT -4. The time now is 08:42.