CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   omit some equations withregularity (https://www.cfd-online.com/Forums/fluent/161134-omit-some-equations-withregularity.html)

Mina_Mbg October 19, 2015 02:57

omit some equations withregularity
 
Hi,
Does anybody hear about turning on and off some equations in specific time interval during simulating in transient mode?for example every 1S turn off turbulence and Navier-stocke equations,but Energy is always involved in simulation.
I am supposed to do that for my simulation which is dry quenching process in high pressure.
involved equations are:SST K-omega,and Energy besides Navier-Stoks
fluid material is Nitrogen and Helium which are applied of cource separately.Unfortunatelly the density for both are temperature dependent!
Hope the question is clear :)
thanks in advanced

amin.z October 19, 2015 03:58

Sounds interesting!
I'm interested in this topic,
Does anybody have any idea?

brunoc October 20, 2015 10:14

You could set predefined commands in Calculation Activities > Execute Commands that turn your equations on and off every N iterations/timesteps.

You could also write a journal file with a loop in scheme language that does that.

Mina_Mbg October 20, 2015 11:39

Thanks for your feedback.
But I am looking for the logic behind that?Why and under which situation we will do that?

brunoc October 20, 2015 11:55

I thought you wanted to use it in your model.

Well, this would be useful anytime the transient thermal behavior is important, but the change in velocities is quasi-static. One example could be the transient thermal behavior of a building. The change in fluid velocities in its interior is small enough that you could consider it to be quasi-static. So solve the energy equation continuously and only update the momentum equations from time to time.

Mina_Mbg October 20, 2015 12:04

Many Thanks for explanaition
Exactly I was told to us that but I havent known the reason.
I use also SST k-omega equation besides Navier-Stoks and Energie.What is your Idea about turning on and off also the turbulent equations?


Quote:

Originally Posted by brunoc (Post 569272)
I thought you wanted to use it in your model.

Well, this would be useful anytime the transient thermal behavior is important, but the change in velocities is quasi-static. One example could be the transient thermal behavior of a building. The change in fluid velocities in its interior is small enough that you could consider it to be quasi-static. So solve the energy equation continuously and only update the momentum equations from time to time.


LuckyTran October 20, 2015 19:35

Like bruno I also thought that you were asking on how to do it, rather than why it is done.

I get why it is beneficial to do a simulation this way, but it is generally not implemented because it's useful only for constant density simulations. For temperature dependent densities and real densities, this method is not applicable. Since the updated temperature field affects the velocity field.

Any time you are dealing with a passive scalar transport this approach is useful, or when doing constant property simulations (where temperature becomes a passive scalar). The passive scalars cannot converge until the velocity field is converged. However, as the passive scalars are passive, there is no benefit to calculating them every iteration. You only need to start computing them after you have the correct velocity field. So it is possible to save considerably on computational cost and initially solve only the velocity field and no others, and then disable velocity field and compute only the scalars. In constant property LES you can reduce overall computational cost by ~20%.

Are you asking particularly about the transient case? It sounds weird to turn equations on and off for transient simulations, but this is commonplace in steady state simulations for the same reasons that it is beneficial in transient simulations.

Mina_Mbg October 21, 2015 03:41

Thanks for your description and feedback.
yes in transient because my simulation goes very slow .I cannot understand wat to you mean by passiv scalar.
I am doubt now about turning off turbulent model especially when the eddies produced.
!



Quote:

Originally Posted by LuckyTran (Post 569335)
Like bruno I also thought that you were asking on how to do it, rather than why it is done.

I get why it is beneficial to do a simulation this way, but it is generally not implemented because it's useful only for constant density simulations. For temperature dependent densities and real densities, this method is not applicable. Since the updated temperature field affects the velocity field.

Any time you are dealing with a passive scalar transport this approach is useful, or when doing constant property simulations (where temperature becomes a passive scalar). The passive scalars cannot converge until the velocity field is converged. However, as the passive scalars are passive, there is no benefit to calculating them every iteration. You only need to start computing them after you have the correct velocity field. So it is possible to save considerably on computational cost and initially solve only the velocity field and no others, and then disable velocity field and compute only the scalars. In constant property LES you can reduce overall computational cost by ~20%.

Are you asking particularly about the transient case? It sounds weird to turn equations on and off for transient simulations, but this is commonplace in steady state simulations for the same reasons that it is beneficial in transient simulations.


amin.z October 28, 2015 13:17

Quote:

Originally Posted by brunoc (Post 569258)
You could set predefined commands in Calculation Activities > Execute Commands that turn your equations on and off every N iterations/timesteps.

You could also write a journal file with a loop in scheme language that does that.

thanks dear Bruno for your answer,
could you please share the command which you use for it in Calculation Activities tab?

amin.z October 28, 2015 13:26

Quote:

Originally Posted by LuckyTran (Post 569335)
Like bruno I also thought that you were asking on how to do it, rather than why it is done.

I get why it is beneficial to do a simulation this way, but it is generally not implemented because it's useful only for constant density simulations. For temperature dependent densities and real densities, this method is not applicable. Since the updated temperature field affects the velocity field.

Any time you are dealing with a passive scalar transport this approach is useful, or when doing constant property simulations (where temperature becomes a passive scalar). The passive scalars cannot converge until the velocity field is converged. However, as the passive scalars are passive, there is no benefit to calculating them every iteration. You only need to start computing them after you have the correct velocity field. So it is possible to save considerably on computational cost and initially solve only the velocity field and no others, and then disable velocity field and compute only the scalars. In constant property LES you can reduce overall computational cost by ~20%.

Are you asking particularly about the transient case? It sounds weird to turn equations on and off for transient simulations, but this is commonplace in steady state simulations for the same reasons that it is beneficial in transient simulations.

Thanks Lucky for sharing your knowledge,
Is it only applicable for energy equation?
Is it logical to use it for turbulence equation?
For isothermal domains, is it logical to ignore mass and momentum cons. equ. for some iterations in each time step and just solve the turbulence equations?

LuckyTran October 28, 2015 15:05

There may be some uses for systematically disabling equations, but can you please tell us what you are trying to do? This is a very tough conversation where we are trying to guess the question to your answer.

For a general problem, I do not think turbulence models should ever be disabled separately from the velocity (flow). The purpose of the turbulence modelling is to model the Reynolds shear stresses which appear explicitly in the momentum equation. Hence, if the turbulence has not converged then neither can the velocity.

It is logical to disable as many equations as you like, after confirming that they have converged. I would agree with disabling flow and turbulence together but not separately.

By disabling flow and solving turbulence you are effectively segregating the solver even further than it already is. e.g. you get two iterations of the turbulence equations for each iteration of the flow equation. What this also does is it gives you a lower effective under-relaxation factor for each disabled equation. But is this what you are trying to do?

Mina_Mbg October 29, 2015 02:07

Hello LuckyTran,
I am supposed to do that in order to accelerate simulation.But it seems to me ambiguous to ignore some equations in some time step regularly.
It is couple scheme problem.

Quote:

Originally Posted by LuckyTran (Post 570751)
There may be some uses for systematically disabling equations, but can you please tell us what you are trying to do? This is a very tough conversation where we are trying to guess the question to your answer.

For a general problem, I do not think turbulence models should ever be disabled separately from the velocity (flow). The purpose of the turbulence modelling is to model the Reynolds shear stresses which appear explicitly in the momentum equation. Hence, if the turbulence has not converged then neither can the velocity.

It is logical to disable as many equations as you like, after confirming that they have converged. I would agree with disabling flow and turbulence together but not separately.

By disabling flow and solving turbulence you are effectively segregating the solver even further than it already is. e.g. you get two iterations of the turbulence equations for each iteration of the flow equation. What this also does is it gives you a lower effective under-relaxation factor for each disabled equation. But is this what you are trying to do?


brunoc December 2, 2015 13:32

Quote:

I don't know do you remember or not, but we had a short discussion in a threat about turning equations on/off:

omit some equations withregularity

and you suggested us to use "execute command" to do this, even though this tab is really helpful, but unfortunately there's no source about the commands we can write there,
and my project had been stuck for this command,
so would you mind sharing the command we use to turn some equations on and off every N iterations/timesteps?

Thanks
Hi Amin,

I'm answering you here in case someone in the future has the same question.

The commands expected by Fluent are the same ones used on its TUI (text user interface) and they change depending on what you have enabled. To find out exactly what "chain" of commands you need, just press [ENTER] on Fluent's TUI and see what comes out. For instance, to find out how to enable the energy equation, you could do something like this (everything in bold is my input, [ENTER] shows the options within that level):

Code:

> [ENTER]
adapt/                  file/                  report/
define/                mesh/                  solve/
display/                parallel/              surface/
exit                    plot/                  views/

> define

/define> [ENTER]
beta-feature-access                            models/
boundary-conditions/                            operating-conditions/
custom-field-functions/                        parameters/
dynamic-mesh/                                  profiles/
enable-mesh-morpher-optimizer?                  set-unit-system
injections/                                    solution-strategy/
materials/                                      units
mesh-interfaces/                                user-defined/
mixing-planes/

/define> models

/define/models> [ENTER]
acoustics/                                      solidification-melting?
addon-module                                    solver/
axisymmetric?                                  species/
crevice-model?                                  steady?
dpm/                                            unsteady-1st-order?
energy?                                        unsteady-2nd-order-bounded?
multiphase/                                    unsteady-2nd-order?
radiation/                                      viscous/

/define/models> energy
Enable energy model? [no] yes
Compute viscous energy dissipation? [no] no
include pressure work in energy equation? [no] no
include kinetic energy in energy equation? [no] no
Include diffusion at inlets? [yes] yes

/define/models>

You'll see that the TUI commands sort of follow the GUI commands through the menu:

http://s21.postimg.org/t71hbnerb/fig1b.png

So, to enable the energy equation in one go, in this specific condition, you could use:
Code:

> define models energy yes no no no yes
You'll need to find out the commands for what you need to do by yourself because, again, the options shown to the user will vary depending on what you have enabled.

Cheers,
Bruno


All times are GMT -4. The time now is 09:06.