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

Steady State Multiphase Simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By HPE
  • 1 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2020, 07:49
Default Steady State Multiphase Simulation
  #1
Member
 
Mike Worth
Join Date: Jun 2019
Posts: 45
Rep Power: 7
MikeWorth 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
MikeWorth is offline   Reply With Quote

Old   May 11, 2020, 19:32
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
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;
}
granzer likes this.
HPE is offline   Reply With Quote

Old   May 12, 2020, 11:21
Default
  #3
Member
 
Mike Worth
Join Date: Jun 2019
Posts: 45
Rep Power: 7
MikeWorth 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
MikeWorth is offline   Reply With Quote

Old   May 13, 2020, 05:49
Default
  #4
Member
 
Mike Worth
Join Date: Jun 2019
Posts: 45
Rep Power: 7
MikeWorth 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 MikeWorth; May 13, 2020 at 09:07. Reason: Added comments about under-relaxation
MikeWorth is offline   Reply With Quote

Old   May 13, 2020, 17:33
Default
  #5
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
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.
lourencosm likes this.
HPE is offline   Reply With Quote

Old   May 19, 2020, 04:39
Default
  #6
Member
 
Mike Worth
Join Date: Jun 2019
Posts: 45
Rep Power: 7
MikeWorth 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.
MikeWorth is offline   Reply With Quote

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

- I think you can use `runTimeControl` FO: https://www.openfoam.com/documentati...e-control.html
HPE is offline   Reply With Quote

Old   June 12, 2020, 11:43
Default
  #8
Member
 
Mike Worth
Join Date: Jun 2019
Posts: 45
Rep Power: 7
MikeWorth is on a distinguished road
Thanks for the suggestion - that looks like the correct approach.

In order to terminate upon a stable surface shape, I want to put the condition on alpha flux. When that is a uniformly low value, the surface has stopped moving.

I can't quite see how to access this alpha flux parameter - presumably there is a way to do it within a configuration file, rather than having to recompile interfoam?
MikeWorth is offline   Reply With Quote

Old   June 22, 2020, 10:57
Default
  #9
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 369
Rep Power: 8
geth03 is on a distinguished road
the steady state would imply a non-changing value of the property solved in the equation. i once used the LTS function for reactingMultiphaseEulerFOam, but a true steady state was never achieved.
i mean the properties U,p etc. still change over time.

i compared results with transient solutions and they weren't even nearly similar, i had completely different results.

does it make sense to use it for complex systems? i mean, turbulence for example is always a transient phenomena.
geth03 is offline   Reply With Quote

Old   June 23, 2020, 06:12
Default
  #10
Member
 
Mike Worth
Join Date: Jun 2019
Posts: 45
Rep Power: 7
MikeWorth is on a distinguished road
In terms of the physics I'm modelling, I feel happy that a steady-state solution should exist. It's the Landau-Levich film case; flow is laminar.

As can be seen in the attached plot, it doesn't want to converge to a stable value. It seems to fluctuate at approximately the expected value of film thickness, but after 2 million iterations hasn't properly stabilized.
Attached Images
File Type: png L-L (Non)convergence.PNG (59.6 KB, 71 views)
MikeWorth is offline   Reply With Quote

Reply


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 19:43
Domain Reference Pressure and mass flow inlet boundary AdidaKK CFX 75 August 20, 2018 06:37
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
Convergence in steady state simulations vs transient ones cardioCFD CFX 5 January 21, 2018 11:59
STeady State Simulation prashantthaker208 FLUENT 0 March 4, 2014 01:48


All times are GMT -4. The time now is 23:28.