HiFiLES / HiFiLES-solver

High Fidelity Large Eddy Simulation Solver
Other
172 stars 131 forks source link

Global time stepping #89

Open zhan1457 opened 9 years ago

zhan1457 commented 9 years ago

I noticed that you guys just updated the code to let global time stepping works. However, for body force term, the use of global time stepping is still not clear. Do you have any idea on how to solve this problem? Thanks.

mlopez14 commented 9 years ago

The solution at each solution point in each element is updated with a time-step. In the case of global time stepping, the time-step across all elements is the same.

The body force terms we have implemented do not depend on time --just space--, hence the time-step does not appear in their implementation.

Maybe I'm missing something, let me know if this is not clear or if what you see in the code contradicts what I say.

zhan1457 commented 9 years ago

Sorry, I meant local time stepping, where the time step varies. If you check evaluate_body_force(int in_file_num), you'll find the time step is also needed since the body force is solved together with the equation. When the local time stepping is used, you guys input

FatalError("Not sure what value of timestep to use in body force term when using local timestepping.");

So the body force should be changed to have different values for each element?

jrbull commented 9 years ago

The body force term is a function of the time step. At each timestep, the flow is forced by an amount that ensures the mass flux converges to the desired mass flux, mdot0. If each cell marches at a different rate in time, I am not sure that this method of forcing the flow is valid. In fact, the body force is intended for unsteady flows, while local timestepping is for steady flows. What is the case that you want to run?

Jonathan

On Aug 20, 2015, at 3:52 PM, zhan1457 notifications@github.com<mailto:notifications@github.com> wrote:

Sorry, I meant local time stepping, where the time step varies. If you check evaluate_body_force(int in_file_num), you'll find the time step is also needed since the body force is solved together with the equation. When the local time stepping is used, you guys input

FatalError("Not sure what value of timestep to use in body force term when using local timestepping.");

So the body force should be changed to have different values for each element?

— Reply to this email directly or view it on GitHubhttps://github.com/HiFiLES/HiFiLES-solver/issues/89#issuecomment-133015038.

zhan1457 commented 9 years ago

To my knowledge, the body force is used to take the pressure drop into consideration. So it should be used in the compressible flow no matter whether the flow is steady or unsteady. Besides, the local time stepping is just a way to accelerate the computation for an explicit scheme when you solve steady flow. The calculation still involves time derivative, which means the mass flux may change during the computation, so the body force should be used when the periodic flow is solved.

mlopez14 commented 8 years ago

I see what you mean. The only case where the local time-stepping with a forcing term would be useful is when you know the flow will reach a steady case. With the current forcing terms we don't expect the flow to reach a steady case, so we throw out an error rather than provide a solution with no meaning.

Nevertheless, removing the FatalError call should allow you to run the forced simulation with local time-stepping; that should provide interesting-looking results.