CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Question on steady and unsteady simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree15Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2023, 10:02
Default Question on steady and unsteady simulation
  #1
New Member
 
Join Date: Mar 2020
Posts: 19
Rep Power: 6
Stargazer is on a distinguished road
Recently, I came across a fundamental question about steady and unsteady simulation, but I am unable to figure it out. Looking forward to some experts:
It's very common to use a steady flow simulation to initialize the unsteady flow simulation; however, now that the flow is already stable, what is the cause of the unsteadiness when switching to the unsteady simulation?
For example, I did a simulation on the 2D laminar flow vortex shedding by Star-CCM+ (a tutorial case):
1) When I start from unsteady simulation directly, the shedding pattern occurs as expected; (see figure1)
2) If I start the flow by steady simulation, and then switch to the unsteady simulation, the flow pattern is still identical to the steady state, Nothing Changed (see figure 2), residuals are very low and Cl is a line during the entire simulation (see figure 3&4). And seems that continuing the simulation won't get the shedding pattern as before.
I am very curious about the rationale behind these phenomena. Thank you!
Attached Images
File Type: jpg unsteady vortex shedding.jpg (133.5 KB, 37 views)
File Type: jpg steady initialization and then unsteady.jpg (155.9 KB, 32 views)
File Type: jpg Residual.jpg (57.4 KB, 30 views)
File Type: jpg Cl.jpg (61.4 KB, 24 views)
aerosayan likes this.
Stargazer is offline   Reply With Quote

Old   December 9, 2023, 13:48
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Stargazer View Post
Recently, I came across a fundamental question about steady and unsteady simulation, but I am unable to figure it out. Looking forward to some experts:
It's very common to use a steady flow simulation to initialize the unsteady flow simulation; however, now that the flow is already stable, what is the cause of the unsteadiness when switching to the unsteady simulation?
For example, I did a simulation on the 2D laminar flow vortex shedding by Star-CCM+ (a tutorial case):
1) When I start from unsteady simulation directly, the shedding pattern occurs as expected; (see figure1)
2) If I start the flow by steady simulation, and then switch to the unsteady simulation, the flow pattern is still identical to the steady state, Nothing Changed (see figure 2), residuals are very low and Cl is a line during the entire simulation (see figure 3&4). And seems that continuing the simulation won't get the shedding pattern as before.
I am very curious about the rationale behind these phenomena. Thank you!



In case of a low Reynolds number, the flow is steady by its nature, no matter of steady or unsteady simulation.

The difference is that the steady simulation resolve only the final state while in the unsteady simulation, depending on the initial and BCs, you can simulate the physical transient condition developing in the steady solution.


If the Reynolds number exceeds the value for a physical steady state, the steady simulation simply must not converge. If it does, then the numerical diffusion changes the Re number to a physical lower value.
aerosayan likes this.
FMDenaro is offline   Reply With Quote

Old   December 9, 2023, 14:59
Default
  #3
Senior Member
 
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8
aerosayan is on a distinguished road
Quote:
Originally Posted by Stargazer View Post
If I start the flow by steady simulation, and then switch to the unsteady simulation, the flow pattern is still identical to the steady state, Nothing Changed
Can you retry this with a high Re flow? Your result will be different.

Your flow seems laminar.

The steady state solution that you're showing has converged (as seen by the drop in residuals, and then becoming flat).

Depending on how your steady state solver is configured, it could've used local timestepping to get the final result. This won't show any vortex shedding.

While the transient simulation shows vortex shedding because it solves each intermediate timestep until reaching the final steady state. Meaning ... if the initial and boundary conditions would create vortex shedding, then they will show up in the simulation, and at the end become as same as the steady simulation's result.

i.e both are correct.

However, Switching to transient after initializing with steady state does nothing, because the flow is already converged to what you'd expect for this low Re flow.
aerosayan is offline   Reply With Quote

Old   December 9, 2023, 21:41
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
The residual plot doesn't really look right to me for the unsteady portion. Is this done with a super large time-step or high Courant number? It's possible but uncommon that the steady solution is so perfect that the unsteady calculation stays perfectly stationary (assuming the transient calculation is being done correctly).
arjun and aerosayan like this.
LuckyTran is offline   Reply With Quote

Old   December 11, 2023, 09:13
Default
  #5
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Beyond what others suggest, I second LuckyTran answer.

More specifically, the initial conditions of the two unsteady simulations (the one starting from steady condition and the one starting from scratch) are not the same and the specific condition you are simulating is possibly not completely unstable (including the effect of numerics).

It is then very possible that when starting from the converged steady simulation, the flow conditions are not enough unstable and any disturbance not strong enough to lead to unsteadiness. In contrast, your scratch initial conditions are probably too far from equilibrium and large distrurbances are introduced during their adaptation, large enough to not be damped by the flow conditions.
Stargazer likes this.
sbaffini is offline   Reply With Quote

Old   December 11, 2023, 09:16
Default
  #6
New Member
 
Join Date: Mar 2020
Posts: 19
Rep Power: 6
Stargazer is on a distinguished road
It's a simple laminar flow. The boundary conditions are the same for steady and unsteady simulations, and there should be vortex shedding at this Re state, as StarCCM+ tutorial shown.

I also want to know the cause of the unsteadiness in other "usual" steady simulations. Is it because the mesh is so fine to capture the small separation that shows the unsteadiness?
Stargazer is offline   Reply With Quote

Old   December 11, 2023, 10:48
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Stargazer View Post
It's a simple laminar flow. The boundary conditions are the same for steady and unsteady simulations, and there should be vortex shedding at this Re state, as StarCCM+ tutorial shown.

I also want to know the cause of the unsteadiness in other "usual" steady simulations. Is it because the mesh is so fine to capture the small separation that shows the unsteadiness?
But can you say the Re number of this tutorial ?
FMDenaro is offline   Reply With Quote

Old   December 11, 2023, 13:29
Default
  #8
Senior Member
 
andy
Join Date: May 2009
Posts: 308
Rep Power: 18
andy_ is on a distinguished road
Quote:
Originally Posted by Stargazer View Post
It's a simple laminar flow. The boundary conditions are the same for steady and unsteady simulations, and there should be vortex shedding at this Re state, as StarCCM+ tutorial shown.

I also want to know the cause of the unsteadiness in other "usual" steady simulations. Is it because the mesh is so fine to capture the small separation that shows the unsteadiness?
By starting from a smooth steady solution in roundoff you are requiring the roundoff errors to create roundoff sized instabilities and for those instabilities to grow. This will likely take a few pass throughs in an energy preserving unsteady code but will eventually happen.

Have you checked if the flow field has changed by a tiny amount from the steady one after a few pass throughs? The residuals won't show anything you will have to look at some field value down to the last few places of precision.

What are the properties of the numerical scheme w.r.t. preserving energy? If it is dissipating the energy in the initial tiny long motions that need to form before anything larger can get going then this will lead to the steady solution remaining. If the transient scheme is closely related to the steady state one this is reasonably likely.

I would be careful about assuming laminar flows to be simple because they are still nonlinear. They can have multiple solutions, asymmetric solutions with symmetric boundary conditions, instabilities and more.
FMDenaro likes this.
andy_ is offline   Reply With Quote

Old   December 11, 2023, 14:03
Default
  #9
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by andy_ View Post
By starting from a smooth steady solution in roundoff you are requiring the roundoff errors to create roundoff sized instabilities and for those instabilities to grow. This will likely take a few pass throughs in an energy preserving unsteady code but will eventually happen.

Have you checked if the flow field has changed by a tiny amount from the steady one after a few pass throughs? The residuals won't show anything you will have to look at some field value down to the last few places of precision.

What are the properties of the numerical scheme w.r.t. preserving energy? If it is dissipating the energy in the initial tiny long motions that need to form before anything larger can get going then this will lead to the steady solution remaining. If the transient scheme is closely related to the steady state one this is reasonably likely.

I would be careful about assuming laminar flows to be simple because they are still nonlinear. They can have multiple solutions, asymmetric solutions with symmetric boundary conditions, instabilities and more.

I agree and since the energy would transfer from small scale perturbation to larger scales, that is an inverse energy transfer that the artefact of the numerical method must not suppress.
A quantitative method is to plot the max time derivative in time and wait to see if it starts increasing.
jpanchog likes this.
FMDenaro is offline   Reply With Quote

Old   December 12, 2023, 08:10
Default
  #10
New Member
 
Join Date: Mar 2020
Posts: 19
Rep Power: 6
Stargazer is on a distinguished road
The information is shown in the figure attached below.
Attached Images
File Type: png 1.png (27.4 KB, 28 views)
Stargazer is offline   Reply With Quote

Old   December 12, 2023, 08:15
Default
  #11
New Member
 
Join Date: Mar 2020
Posts: 19
Rep Power: 6
Stargazer is on a distinguished road
Quote:
Originally Posted by andy_ View Post
By starting from a smooth steady solution in roundoff you are requiring the roundoff errors to create roundoff sized instabilities and for those instabilities to grow. This will likely take a few pass throughs in an energy preserving unsteady code but will eventually happen.

Have you checked if the flow field has changed by a tiny amount from the steady one after a few pass throughs? The residuals won't show anything you will have to look at some field value down to the last few places of precision.

What are the properties of the numerical scheme w.r.t. preserving energy? If it is dissipating the energy in the initial tiny long motions that need to form before anything larger can get going then this will lead to the steady solution remaining. If the transient scheme is closely related to the steady state one this is reasonably likely.

I would be careful about assuming laminar flows to be simple because they are still nonlinear. They can have multiple solutions, asymmetric solutions with symmetric boundary conditions, instabilities and more.
Sorry, but what energy are you referring to? There is no energy equation involved.
The numerical scheme is coupled algorithm with second order discretization.
Stargazer is offline   Reply With Quote

Old   December 12, 2023, 08:25
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
What about the numerical discretization ? The Re number is low, just the numerical diffusion can suppress the oscillations (real Re number <50) or it requires several turnover times to realize the fully developed field.
How long did you run the cose from the steady state ?
FMDenaro is offline   Reply With Quote

Old   December 12, 2023, 10:28
Default
  #13
Senior Member
 
andy
Join Date: May 2009
Posts: 308
Rep Power: 18
andy_ is on a distinguished road
Quote:
Originally Posted by Stargazer View Post
Sorry, but what energy are you referring to? There is no energy equation involved.
The numerical scheme is coupled algorithm with second order discretization.
There are many different numerical schemes that are second order and coupled. They have different sets of numerical properties which are appropriate for different types of flows. Whether by accident or design you have chosen a test case which will likely show some of those differences w.r.t. to the numerical conservation of mechanical energy.

In an LES scheme arranging the differencing to numerically conserve mechanical energy is beneficial given it's role in turbulent motion. For a steady state scheme the opposite is the case with energy in the unsteady motion not wanting to be conserved but dissipated as quickly as possible to get to steady state.

I am not familiar with the details of the commercial code you are using but there is a fair chance it has settings for alternative differencing schemes for different types of flows. With luck this will be in the manual with guidance on what is best for what.

PS Have you checked if the solution has moved slightly away from steady state by looking at some field values and not the residuals or large integrated quantities which won't pick up tiny changes.

Last edited by andy_; December 12, 2023 at 10:32. Reason: PS
andy_ is offline   Reply With Quote

Old   December 13, 2023, 08:49
Default
  #14
New Member
 
Join Date: Mar 2020
Posts: 19
Rep Power: 6
Stargazer is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
What about the numerical discretization ? The Re number is low, just the numerical diffusion can suppress the oscillations (real Re number <50) or it requires several turnover times to realize the fully developed field.
How long did you run the cose from the steady state ?
9 seconds, may be not enough?
Stargazer is offline   Reply With Quote

Old   December 13, 2023, 08:58
Default
  #15
New Member
 
Join Date: Mar 2020
Posts: 19
Rep Power: 6
Stargazer is on a distinguished road
Quote:
Originally Posted by andy_ View Post
There are many different numerical schemes that are second order and coupled. They have different sets of numerical properties which are appropriate for different types of flows. Whether by accident or design you have chosen a test case which will likely show some of those differences w.r.t. to the numerical conservation of mechanical energy.

In an LES scheme arranging the differencing to numerically conserve mechanical energy is beneficial given it's role in turbulent motion. For a steady state scheme the opposite is the case with energy in the unsteady motion not wanting to be conserved but dissipated as quickly as possible to get to steady state.

I am not familiar with the details of the commercial code you are using but there is a fair chance it has settings for alternative differencing schemes for different types of flows. With luck this will be in the manual with guidance on what is best for what.

PS Have you checked if the solution has moved slightly away from steady state by looking at some field values and not the residuals or large integrated quantities which won't pick up tiny changes.
The numerical scheme: second order upwind for convection term, and time is second order implicit. Coupled solver solvers the equation in (pseudo-) time-marching way.
As for the field values, do you mean such as the local pressure of one point in the flow field?
Stargazer is offline   Reply With Quote

Old   December 13, 2023, 09:01
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Stargazer View Post
9 seconds, may be not enough?
Your reference time is D/U, that is about tr=0.07s.
This 9s of full simulation should be sufficient to show the departure fromthe steady state. As I wrote, plot the max time derivative along t/tr.
FMDenaro is offline   Reply With Quote

Old   December 13, 2023, 10:54
Default
  #17
Senior Member
 
andy
Join Date: May 2009
Posts: 308
Rep Power: 18
andy_ is on a distinguished road
Quote:
Originally Posted by Stargazer View Post
The numerical scheme: second order upwind for convection term, and time is second order implicit. Coupled solver solvers the equation in (pseudo-) time-marching way.
OK we seem to be struggling with the details and having just checked the STAR manual doesn't seem to be openly available for non-customers. Perhaps it doesn't matter too much and we can likely guess that the differencing of the convection terms is diffusive, pressure smoothing is present and the boundary layer likely hasn't been fully resolved all of which will tend to hinder the formation of instabilities at a Reynolds number that is only just large enough for vortices to start shedding.

The scheme is likely to be consistent and so if it isn't initiating shedding (which we haven't yet fully checked) then increasing the grid resolution will lead to it eventually starting. Alternatively changing to a numerical scheme developed for LES will likely enable shedding to initiate on coarser grids.

Quote:
Originally Posted by Stargazer View Post
As for the field values, do you mean such as the local pressure of one point in the flow field?
You need to check where instabilities are likely to start forming which will be a waviness in the boundary layer over the cylinder. I would check all solution variables in a few places and get the values printed out by the solver and not the plotting software which may be averaging and dropping precision.
Stargazer likes this.
andy_ is offline   Reply With Quote

Old   December 15, 2023, 08:41
Default
  #18
Senior Member
 
andy
Join Date: May 2009
Posts: 308
Rep Power: 18
andy_ is on a distinguished road
PS My assumption that a fine grid is all that is needed to get vortex shedding may not be correct. When flow patterns switch with some parameter like Reynolds number there can be a range of that parameter where one can get either flow pattern depending on the initial conditions. Whether this is the case here I am not sure but one can likely look it up if interested. This effect can be quite strong with swirling flows and caused me some bafflement 40 years ago with some of my early simulations.
andy_ is offline   Reply With Quote

Old   December 18, 2023, 07:51
Default
  #19
New Member
 
Join Date: Mar 2020
Posts: 19
Rep Power: 6
Stargazer is on a distinguished road
I did some tests on this case (same mesh and same time-step):
1. First steady simulation with coupled solver, then unsteady simulation with coupled solver, as shown no vortex shedding, and very low residuals;
2. First steady simulation with coupled solver, then unsteady simulation with segregated solver (SIMPLE algorithm), residuals rise gradually and vortex shedding happens in the end;
3. First steady simulation with segregated solver, then unsteady simulation with segregated solver: the steady state is very difficult to reach (high residuals, bad convergence), vortex shedding is shown even in steady simulation, and of course, there is vortex shedding in the unsteady simulation.

It seems that the solver (coupled or segregated) is the main course, which is quite astonishing to me. Because from my side, these two solvers should provide close results. Coupled solver usually is more stable and needs less iteration than segregated solver, and coupled solver is widely used, even as the best practice in many industries. In my case, it looks like the "error" is the cause of the unsteadiness. SO weird...
jpanchog likes this.
Stargazer is offline   Reply With Quote

Old   December 18, 2023, 07:55
Default
  #20
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by Stargazer View Post
I did some tests on this case (same mesh and same time-step):
1. First steady simulation with coupled solver, then unsteady simulation with coupled solver, as shown no vortex shedding, and very low residuals;
2. First steady simulation with coupled solver, then unsteady simulation with segregated solver (SIMPLE algorithm), residuals rise gradually and vortex shedding happens in the end;
3. First steady simulation with segregated solver, then unsteady simulation with segregated solver: the steady state is very difficult to reach (hardly converged), vortex shedding is shown even in steady simulation, and of course, there is vortex shedding in the unsteady simulation.
It seems that the solver (coupled or segregated) is the main course, which is quite astonishing to me. Because from my side, these two solvers should provide close results. Coupled solver usually is more stable and needs less iteration than segregated solver, and coupled solver is widely used, even as the best practice in many industries.
SO weird...
Welcome to nonlinear world!!!
arjun likes this.
sbaffini is offline   Reply With Quote

Reply

Tags
steady and unsteady state


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
Start the unsteady computation based on the steady simulation results Amber0922 SU2 2 July 22, 2023 23:23
Using steady state results to initialize flow in unsteady simulation sabesj_ STAR-CCM+ 3 February 8, 2023 06:03
starting with steady simulation then implicit unsteady decreases convergence time? hguvenc Main CFD Forum 3 November 19, 2021 09:17
Unsteady simulation gives steady result tundradot Main CFD Forum 3 October 1, 2021 14:44
How do set a steady solution as an initial solution to an unsteady simulation? pro_ SU2 10 April 28, 2020 18:05


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