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

Flow Initialization for Hypersonic Case

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 15, 2020, 12:41
Default Flow Initialization for Hypersonic Case
  #1
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
I am trying to initialize my flow field. I am planning to use full-multigrid (FMG) initizalitation because It has work really good for me in the past in terms of computational resources and convergence rate. My case works perfectly when I use ideal gas models but when I use a real gas model (any of them, even my user-defined real gas model for hypersonic flow) my initialization diverges. The only parameters that I can play with are:

1) the number of refinement levels (I am using 3 cycles).
2) the residual of each level (0.0005 in all the levels).
3) the number of cycles per level (100-200-300 in 1st, 2nd and 3rd cycles).
4) the FMG courant-number (I set 0.25)
5) enable FMG verbose (I am not sure of its fuction).

As far as I understand, the convergence has to be achieved in every level and for having a good initialization the residual should be low enough and for that reasong I am increasing the number of iterations significantly. Are there any tips for ensuring the convergence of a FMG initialization?
Captain Convergence is offline   Reply With Quote

Old   March 15, 2020, 13:01
Default FMG Initialization
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
FMG Initialization is based on solution of Euler equations. Since the equations are Euler, there is no diffusion or turbulence. Therefore, the very first and important aspect is to ensure proper turbulence initialization before FMG initialization. FMG will not do that. You can also define CFFs for k and \varepsilon or \omega and patch those values after fmg-initialization is done based on the initialized field.

1. Use more than 3 levels of coarsening. 3 is alright if mesh is already very coarse, which I doubt in your case because of Hypersonic flow
2. You are being overoptimistic with the residual level. Set it slightly higher, may be 0.001.
3. Use more iterations at coarse level and not the other way around.
5. Meaning of verbosity is same as in literal English; it just provides more information

For real gases, fmg-initialization will not be helpful. You have to start from the solution based on ideal gas and then switch to real gas.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 15, 2020, 16:55
Default
  #3
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
I have been trying the following approach for starting with an ideal-gas formulation and then switching to a real-gas formulation:

1) Initialize the simulation with full-multigrid initialization
2) Run in explicit mode with low Courant and under-relaxation factors (~0.25) (200 iter)
3) Incease the Courant number and relaxation factors (~0.75) (200 iter)
4) Switch to implicit mode with pseudo-transient formulation for accelerating the convergence (300 iter)
5) Switch back again to explicit mode for preparing the gas formulation (100 iter)
6) Switch the gas formulation and set very low values for Courant num and relaxation factors (~0.01) in order to avoid divergence and continue in explicit mode.

This approach gives me a nice rate of convergence (see attached residuals) and the simulation can be assumed to be converged. Therefore it can be my "ideal-gas" initialization. However, as soon as I change the gas formulation the simulation diverges abruptly. How could I perform the gas-formulation change in order to avoid that sudden change? Thank you in advance.
Attached Images
File Type: png Captura.PNG (23.0 KB, 20 views)
Captain Convergence is offline   Reply With Quote

Old   March 16, 2020, 05:32
Default Real Gas
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
If there is a significant difference in the properties for the real gas as compared to those of the ideal gas, then the convergence difficulties are expected. To check that, you need to observe the property variation. Once the ideal gas simulation is stable enough, export its properties, say, as contours. Then switch to UDF for real gas and without running even a single iteration, export real gas properties in the same manner. Compare with those from ideal gas. If change in any of the properties, particularly density and specific heat is more than, say 30-40%, then you have to bring in the change slowly. If it is more than that, then I'd recommend to check the UDF once again; not for the bugs but for its accuracy.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 16, 2020, 17:58
Default Found the source of error
  #5
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
I have been trying the whole afternoon to switch from the ideal-gas solution to the real-gas solution but I keep having a massive jump in the residuals that cause the divergence of the simulation no matter how low I set my courant and under-relaxation factors. I am only modifying the density with the real-gas-soave-redlich-kwong formulation, the other parameters (Cp and molecular weight, my case is inviscid by now) are kept constant.

I think that the source of error is the type of boundary conditions that I took. For my case I am using mass flow inlet (150000 kg/s for achieving Mach 9.6) and pressure outlet (set at 101325 Pa) but the free stream density is around 40 kg/m3 and the free stream temperature is around 25 K even though I specified 300 K at the inlet. Then when I switch to real-gas, the big jump in the calculated properties causes a numerical stall. Therefore I have no control of the free stream gas properties. I am trying to replicate a NASA's experiment where only Mach number and Reynold number are given and thus I have total freedom to set the free stream properties as long as the Mach and Reynolds numbers are met. How could I control in a better way the free stream conditions? Thank you in advance.
Captain Convergence is offline   Reply With Quote

Old   March 17, 2020, 04:10
Default Mach 9.6
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
For a Mach 9.6 with Air, you do not need to solve N-S. Just solve Euler equations. In any case, the temperature specified at the inlet is total temperature and not static temperature. You need to calculate what should be total temperature so that static temperature turns out to be 300 K. One approach is to apply some temperature at inlet, go to Initialization, and select Compute From Inlet. It will calculate static temperature. Change the temperature at the inlet until you find a good match. Or you can directly use the equation to determine static temperature based on Mach number.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 18, 2020, 10:20
Default Boundary conditions
  #7
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
I found a better way to set up my boundary conditions by using a pressure inlet that drives the flow through the computational domain. I am using the isentropic relations (taking into account my real gas propertias) for calculating the static temperature (the total/stagnation temperature is given in my report, 922 Kelvin) and the total pressure at the inlet as a function of the static pressure at the outlet. It works quite well at low supersonic Mach number, around 1-5 (see the attached calculations) but when I try to apply the same procedure for Mach 9.6 I need a free stream temperature of 47 Kelvin and 8.17e8 Pa (8060 atm) that causes my simulation to diverge at the initialization and my user-defined real gas model is not suitable for such low temperatures. How could I set up such conditions without these extreme values? I believe it is possible to work with Mach ~10 without many issues because there are simulations at Mach ~25.
Attached Images
File Type: png Mach3.PNG (45.9 KB, 15 views)
File Type: png Mach9.6.PNG (44.9 KB, 11 views)
Captain Convergence is offline   Reply With Quote

Old   March 18, 2020, 10:47
Default Flow at high Mach
  #8
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
The relation you used is valid for isentropic process, implying it is valid only for ideal gas and not for real gas. For real gases, the relation is non-linear and need to be solved iteratively.

Mach number in itself does not specify everything; it has to be used in conjunction with Re or Kn. In case Re is low with high Ma, N-S will not work since Kn becomes large. For such high Ma number flows, usually DSMC method is used, which is implementation for solving Boltzmann and not N-S. For Mach 25, most likely method would be DSMC and not RANS or DNS.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 18, 2020, 11:18
Default
  #9
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
So wouldnīt the relationship P/Pt = (1+(gamma-1)/2*Mach^2)^(-gamma/(gamma-1)) work if gamma is calculated from the real gas model? My real gas model is entirely in function of P and T.

How could I iterate to achieve the boundary conditions? Like this?:

1) set target Mach and Re numbers.

2) calculate cp, rho, mu as a function of T0 and P0 (free stream static temperature and static pressures).

3) Calculate total temperature at the inlet using... the above relation? This is the step that confuses me the most.

4) Calculate speed of sound and the free stream velocity.

5) Calculate Reynolds number.

6) Check if Reynold and Mach numbers meet the targets if no go back to 2) and update somehow T0 and P0.

Moreover, I am still a bit confused with the real gas model inputs, in Fluent Theory it says only temperature, but is it total or static? and the same with the pressure at the "double REAL_density" macro, is it the total or static? in the rest of macros it states that it is importing the absolute pressure from the solver.

Than you in advance your are being a life saver to me!
Captain Convergence is offline   Reply With Quote

Old   March 18, 2020, 11:27
Default Equation and Temperature
  #10
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Density of a gas is dependent on static temperature and not total temperature. Total temperature is a property of flow and not fluid.

As far as the equation is concerned, this equation is invalid for real gases. There are multiple models for real gases to predict stagnation properties and almost all equations require iterative solutions.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 19, 2020, 10:48
Default
  #11
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
I have been reading about it and a gas can be considered as "ideal" if the temperature is sufficiently low (i.e. gamma ~1.4). Any disturbance (even small) that causes a shock will heat the gas to a level where vibrational energies are excited, and in these regions and downstream of these disturbances the gas is not perfect any more. But far from the region of interest (i.e. an aircraft travelling at hypersonic speed) the isentropic relationships can be applied, for example, to calculate the boundary conditions.

I have double checked my experimental data and recalculated the quantities (see the attached image). Therefore my BCs are:

Pressure-intlet, Total Pressure = 4,56E+06 Pa and Total Temperature = 922 Kelvin.
Pressure-outlet, Gauge Pressure/Static Pressure = 141.36 Pa and Total Temperature = 922 Kelvin.
Operating Pressure, 0 Pa.

However I have backflow at the outlet when I initialize the case, and the pressure at the inlet is clearly higher than the one applied at the outlet. Why could be the reason for this?
Attached Images
File Type: png BCs.PNG (42.7 KB, 8 views)
Captain Convergence is offline   Reply With Quote

Old   March 19, 2020, 11:04
Default Ideal and Real Gas
  #12
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
I am afraid you read it wrong. A gas can be considered ideal only at higher temperature and lower pressures and not the other way around. Anyway, the reason for flow reversal is the pressure at the outlet. The pressure you have used implies vacuum. If the flight is within atmospheric limits, then absolute static pressure is around 100000 Pa and not 141 Pa. As far as temperature is concerned, it won't matter much until there is flow reversal.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 19, 2020, 12:59
Default
  #13
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
But at high temperatures the other temperature modes (specially vibrational and rotational) get exited and this is what causes the gas properties change right? At low temperatures the ratio between cp and cv is approximately 1.4 and thatīs why the isentropic relations can be used even though the Mach number is hypersonic. Am I correct?

Regarding the pressures, I see your point but I am simulating a hypersonic experiment carried out in a hypersonic wind tunnel. Therefore I am trying to replicate the boundary conditions at the test section (between the high pressure tank and the vacuum tank). If the pressure at the inlet (high pressure tank) is higher than the pressure at the outlet (vacuum tank) the flow should go from inlet to outlet. Just to make sure that it is not the geometry what is causing the divergence of the initialization, I have created a VERY simple case (see the attached image) with structured mesh, ideal-gas formulation, only inlet, outlet and symmetry with the experimental conditions calculated in the previous post. The flow should go from inlet to outlet without eny disturbance but the initialization diverges and predicts reversed flow at the outlet. I cannot find any error in such simple boundary conditions set up.

Thank you again for you answers, they are being very helpful!
Attached Images
File Type: jpg SimpleCase.jpg (88.7 KB, 10 views)
Captain Convergence is offline   Reply With Quote

Old   March 19, 2020, 13:34
Default Flow reversal
  #14
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
The flow reversal based on the initial guess is not important. It's just initial guess and the pressure distribution is not final one. Let the case run.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 19, 2020, 16:42
Default
  #15
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
I tried to do so but even thought the fmg-initialization has converged, it says that the flow is reversed at the outlet and I have no flow field initialized (even the density is 0), therefore I cannot even start my simulation. I have tried this:

Pressure-intlet, Total Pressure = 4,56E+06 Pa, Supersonic/Initial Gauge Pressure = 141.36 (the same as the outlet static pressure) and Total Temperature = 922 Kelvin.
Pressure-outlet, Gauge Pressure/Static Pressure = 141.36 Pa and Total Temperature = 922 Kelvin.
Operating Pressure, 0 Pa.

and also this:

Pressure-intlet, Total Pressure = 4,56E+06 Pa, Supersonic/Initial Gauge Pressure = 0 (the same as the outlet) and Total Temperature = 922 Kelvin.
Pressure-outlet, Gauge Pressure/Static Pressure = 0 Pa and Total Temperature = 922 Kelvin.
Operating Pressure, 141.36 Pa.

But in any of the cases the simulation starts
Captain Convergence is offline   Reply With Quote

Old   March 20, 2020, 04:57
Default Initial Conditions
  #16
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
The issue is being caused because both of the initial conditions are wrong. Density is calculated based on the absolute static pressure. If you initialize with 0, which is the case when you choose second option, then everything blows off. The first scenario is not that bad but it is nowhere close to good. You need to provide Supersonic/Initial Gauge pressure very close to the Total Pressure and not equal to outlet pressure. So, use a pressure of 4e6 for Supersonic/Initial Gauge pressure and then initialize.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 20, 2020, 10:14
Default
  #17
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
I found the way to fix the issue with the initialization, I can use pressure far-field in the whole domain, initialize the solution, run the flow for a while and then I have the solution started. Therefore I can switch to pressure inlet and outlet with the conditions calculated previously and continue with the calculations
Captain Convergence is offline   Reply With Quote

Old   March 20, 2020, 10:37
Default Good
  #18
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Nice to know that it started working. All is well if it ends well.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   January 5, 2021, 15:19
Default
  #19
New Member
 
roniroket
Join Date: Jan 2021
Posts: 4
Rep Power: 5
roniroket is on a distinguished road
Can you explain a bit detailed as a guideline?
I try to solve a hypersonic problem which is Mach5.
I am doubtful about my pressure inlet boundary conditions, solution diverges.
roniroket is offline   Reply With Quote

Old   January 6, 2021, 06:12
Default
  #20
Member
 
Cpt. Convergence
Join Date: Feb 2020
Posts: 98
Rep Power: 8
Captain Convergence is on a distinguished road
Can you give us more details regarding your set up? (i.e. CFD solver, boundary conditions, geometry, mesh, gas model, etc...) We might be able to give you some tips
Captain Convergence 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
Solution initialization in case of couette flow dreamz FLUENT 0 March 15, 2015 08:49
solving a case on flow through duct hariya03 OpenFOAM Running, Solving & CFD 0 August 10, 2013 16:30
how to predict unsteady flow from case definition? Felix Main CFD Forum 6 August 28, 2007 16:40
Validation case for turbulent flow Ratan Main CFD Forum 0 October 4, 2005 03:03
Validation case for turbulent flow Ratan Main CFD Forum 0 October 4, 2005 03:02


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