Science topic

# CFD Coding - Science topic

This topic is to discuss the various issues involved in debugging or writing any kind of code in cfd .
Questions related to CFD Coding
Question
Dear all,
I have tried to simulate the phase change from a solid to liquid in Ansys FLUENT by providing heat flux at a wall [Using the Solidification and Melting model]. I got the results [video attached: 0-1 min temp plot, after 1 min liquid phase plot]; the heat flux creates temperature change over time, leading to a change in phase based on the solidus and liquidus temperatures.
But, the fluid flow doesn't occur, i.e., the flow equation is not solved. I want to simulate the flow of liquid PCM due to gravity. Is there any predefined option to perform that? or is any udf available? Kindly help me..
Prince Abraham Turn on gravity option on, and use techplot soft for particle movement. that will give better result . or you can also go for rockey 2.0 software.
Find below article in which you can see flow,:
Question
Hi, I have been trying to import the thermophysical properties of CO2 (for the supercritical region) to Fluent by using UDF. End of the analysis, the result is not correct. I think Fluent is pulling a Tref value which causes my enthalpy to go negative; therefore, the energy equation does not give accurate temperature results, so the result of thermophysical properties, which are functions of temperature, are wrong. I want to be grateful if you could share your recommendations, especially on the methods of correct calculation of enthalpy. My specific heat code is as follows:
#include "udf.h"
DEFINE_SPECIFIC_HEAT(supercritical_cp, T, Tref, h, yi)
{
real cp;
if (300. >= T)
{
cp = 2.256999118844760E-02 * pow(T, 4.) - 2.606618818487370E+01 * pow(T, 3.) + 1.129129898467780E+04 * pow(T, 2.) - 2.174235523392760E+06 * T + 1.570278261279480E+08;
}
if (300. > T >= 306.)
{
cp = 1.147018354719330E+01 * pow(T, 4.) - 1.385519872072390E+04 * pow(T, 3.) + 6.276090044658930E+06 * pow(T, 2.) - 1.263530241490370E+09 * T + 9.539285116131690E+10;
}
if (306. > T >= 307.8)
{
cp = -1.611612838918710E+04 * pow(T, 4.) + 1.978085636985280E+07 * pow(T, 3.) - 9.104578256081260E+09 * pow(T, 2.) + 1.862478067464320E+12 * T - 1.428738938943020E+14;
}
if (307.8 > T >= 310.)
{
cp = -1.576135476848110E+03 * pow(T, 4.) + 1.945866130859760E+06 * pow(T, 3.) - 9.008641337104630E+08 * pow(T, 2.) + 1.853611584329810E+11 * T - 1.430227164258690E+13;
}
if (310. > T >= 320.)
{
cp = 1.770529718817220E+00 * pow(T, 4.) - 2.242833202341920E+03 * pow(T, 3.) + 1.065432793165650E+06 * pow(T, 2.) - 2.249454519629040E+08 * T + 1.781003821884030E+10;
}
if (320. > T)
{
cp = 2.086961941877520E-03 * pow(T, 4.) - 2.851496372954040E+00 * pow(T, 3.) + 1.461548345109060E+03 * pow(T, 2.) - 3.330816449664890E+05 * T + 2.848088978782360E+07;
}
*h = cp*(T-Tref);
return cp;
}
I've looked at the polynomials that you have noted: none of them make sense, whether using actual temperatures or reduced temperatures.
I suggest going back to the original data and making your own, (lower order) curve fit using Excel.
One further comment, you would be mis-calculating enthalpy if you used your last equation as it assumes a constant specific heat over the temperature range: the correct form is to integrate Cp.dT over the range, I would integrate the secific heat equation (if it was correct).
Question
I am trying to use NIST Real Gas Model for heat transfer studies of super-critical water. I want to write a code to be used in fluent and know nothing about coding. Will some one please help me as it is a part of my final year project.
Thanks in advance. :)
1. Enabling the appropriate NIST real gas model: If you are solving for a single-species flow then you should enable the single-species NIST real gas model by typing the following text command at the ANSYS Fluent console prompt:
> define/user-defined/real-gas-models/nist-real-gas-model use NIST real gas? [no] yes
If you are solving for multi-species mixture then you should enable the multi-species NIST real gas model by typing the following text command at the ANSYS Fluent :
> define/user-defined/real-gas-models/nist-multispecies-real-gas-model use multispecies NIST real gas? [no] yes
NIST Real gas model:
UDF Tutorial:
Question
I have a specific case about internal pipe flow with constant heat flux. Although the inlet boundary condition is laminar, the flow is a passing transition (a significant part of the tube) and turbulent regime along the tube (because of the change of thermophysical properties depending on implied heat). SST models with intermittency term (For fully laminar flow, γ = 0 and the model reverts to a laminar solver. When γ = 1, the flow is fully turbulent.) can catch laminar/transitional and turbulent flow regimes. These models were designed for turbulent inlet boundary conditions (models solve intermittency term, so it needs extra boundary conditions such as turbulent intensity). Can Transitional SST Models be used for laminar inlet / turbulent outlet boundary conditions? If so, what is the approach?
Regards,
EB
Hi
I tried to run an ANSYS FLUENT simulation with SST Model and it was hard to converge. The laminar model should converge, I'd suggest using a better quality mesh.
In some cases the SST will resolve to low/zero turbulence, but that is not always the case. The SST model will have turbulent fluid coming in the inlet, as set by your boundary condition. This would take time/distance to convert to laminar using the SST model. Check your Viscosity ratio in your results, see how turbulent the SST model is showing your flow to be. Laminar flows can have problems converging where they are actually turbulent flows, or where transient laminar flow structures exist. (This is assuming you have a good quality mesh and the simulation is correctly set up.) If you say the flow should be laminar then it is still quite possible that a laminar steady state simulation will not converge because of transient flow structures. This is very common in heat transfer simulations with natural convection - the natural convection tends to have transient laminar structures. If this is the case the only way to proceed is to do a transient laminar simulation. If you solve a laminar simulation with a turbulence model you are adding extra dissipation to the model. This dissipation is not real, it is a product of the turbulence model you are using, but it can have the effect of damping out these transient flow structures and apparently converging. The SST turbulence model is better than most turbulence models as when the turbulent kinetic energy goes to zero (it is exactly zero in a laminar flow, by definition) the turbulent viscosity also goes to zero, so SST does not add much dissipation to the model and you might get away with it. But k-epsilon based models are well known to have far too much dissipation in the low Reynolds number regimes because as k goes to zero the turbulent viscosity goes to a finite value, and this is false additional dissipation. This is why the k-e model is a bad choice for low Reynolds number flows, and you either need to modify it or use a k-omega based model like SST which does give zero turbulent viscosity at zero turbulent kinetic energy. However, if your flow is steady state laminar and you use the SST turbulence model the turbulence model is likely to give effectively zero turbulent viscosity, meaning that your answer probably will be reasonably accurate (only with a small amount of extra dissipation). If your flow is transient laminar and you use the SST turbulence model there is a good chance the turbulence model will generate too much dissipation and damp out the transient flow, which is wrong. You are likely to get a big error in this case. In this case using the SST turbulence model is wrong. A transient laminar model is correct. Note you will need to do time step, mesh and convergence criteria sensitivity studies to work out what you need for time step and mesh size, and convergence criteria.
Hopefully that explains things a bit.
Question
Dear researchers,
I am currently working on the development of a Low Mach Number multi-species solver (a system similar to that used in LMN combustion, but with no reactions at present ...) I am having issues with deriving the exact temperature equation (note that c_p varies for each species...) I emphasize that I am looking for having an equation expressed as a function of the temperature (not enthalpy, not internal nor total energy !)
- Can you please help by providing some references that can help to derive this equation ?
- Shall I start from the conservation equation of the internal or total energy ? should I neglect specific terms ?
- From your experience, is the inter-species diffusion term important and should be taken into account in such a system of GE ?
- Same for the term div(Pu) ? any ideas
- Same for the viscous tensor (u Tau) ... this is so complex to code in fact ....
Thanks for your comments and recommendations !
Regards
Elie
I suggest that you develop your mathematical approach around the fundamental quantities that are conserved rather than secondary ones. For example, temperature is not conserved, while energy is. Force, momentum (angular and linear), mass, and energy are conserved, while velocity isn't. There are also "conservative" forms of partial differential equations (Google "navier-stokes conservative form") and non-conservative ones. For example ∂(ρCT)/∂x vs. ρC∂T/∂x. Use the conservative forms and ∂E/∂x then calculate ρ, C, and T from H. The same thing goes for pressure, which isn't conserved, while dF=d(ma) works even when m and a are both changing. Solving for T as a function of H and composition (instead of H as a function of T) is just another equation to solve and there are many possible approaches.
Question
Hello,
I've successfully simulated the closure of a flapper non-return valve as illustrated.
The inlet velocity increases gradually with a specific acceleration.
The following UDF is used to specify the motion of the flapper:
#include "udf.h"
DEFINE_SDOF_PROPERTIES(flappers_motion, sdof_prop, dt, time, dtime)
{
Six_DOF_Object *sdof_obj = NULL;
sdof_prop[SDOF_MASS] = 2.73e-3; /* flapper's submerged weight */
sdof_prop[SDOF_IXX] = 2161.86e-9; /* around the hinge */
sdof_prop[SDOF_IYY] = 367.96e-9;
sdof_prop[SDOF_IZZ] = 2471.27e-9;
real m= sdof_prop[SDOF_MASS];
real L= 0.024479 ;
sdof_prop[SDOF_LOAD_M_X] = 0 ;
real th_deg = theta * 180 * 7 / 22 ; /* valve opening angle, in degree */
sdof_obj = Get_SDOF_Object(DT_PU_NAME(dt));
if (NULLP(sdof_obj))
{
/* Allocate_SDOF_Object must be called with the same name as the udf */
sdof_obj = Allocate_SDOF_Object(DT_PU_NAME(dt));
SDOFO_1DOF_R_P(sdof_obj) = TRUE; /*1DOF rotation*/
SDOFO_DIR(sdof_obj) = 1.0;
SDOFO_DIR(sdof_obj) = 0.0;
SDOFO_DIR(sdof_obj) = 0.0;
SDOFO_CENTER_ROT(sdof_obj) = 0.0;
SDOFO_CENTER_ROT(sdof_obj) = 0.0;
SDOFO_CENTER_ROT(sdof_obj) = 0.0;
SDOFO_CONS_P(sdof_obj) = TRUE; /* constrained motion */
if (SDOFO_CONS_P(sdof_obj))
{
SDOFO_LOC(sdof_obj) = 0.0;
SDOFO_MIN(sdof_obj) = -0.0349 ; /* min allowable angle */
SDOFO_MAX(sdof_obj) = 1.0471 ; /* max allowable angle */
SDOFO_INIT(sdof_obj) = SDOFO_LOC(sdof_obj);
SDOFO_LOC_N(sdof_obj) = SDOFO_LOC(sdof_obj);
}
}
}
But now I want to simulate the closure of the flapper, taking into account the friction at the flapper's hinge.
I tried to just assign the friction value to "sdof_prop[SDOF_LOAD_M_X]" ,but the flapper started to move backwards (opening) until the flow increases, which is not correct.
So I want to get the value of the hydrodynamic torque of the flapper, and compare it to the friction with some kind of "if statement" that may look like this:
real static_friction= 50;
real kinetic_friction=40;
real hydraulic_torque =??? ;
If (hydraulic_torque<static_friction)
{
}
else
{
}
BUT THE PROBLEM IS :
I don't know the udf code that can get the actual value of the hydraulic_torque on the flapper to compare it to the friction value.
Your help is highly appreciated.
Thanks a lot in advance.
Ok, I've found how,
In case of someone else has the same issue,
Use the macro :
Compute_force_and_moment
Within the 6dof code
Question
In order to represent our observations or sight of a physical process and to further investigate it by conducting experiments or Numerically models? What are basics one need to focus ? Technically, how one should think? First, thing is understanding, you should be there! If we are modeling a flow we have to be the flow, if representing a let's say a ball, you have to be the ball! To better understand it! What are others?
Aditya Kumar Mishra replication is tough though i do agree with the expert comments above that physical replication like visualization is a must one of the important criteria I feel is to To assess applicability one must always specify the requirements along with exact what attribute of a previous results of interest.
Question
Hello all,
I am looking for a simple test case to validate model for perfect gas with heating, preferable flow in a channel. Does there exist any analytical or reference solution for such case
Any appropriate reference would be really helpful. (I am operating in laminar regime )
Thanks
Maybe thermal Couette flows.?
Several are present in our article below.
Pierre.
Question
Hello,
I am looking to write an UDF code for inlet velocity!
How can I assign inlet transiant velocity through UDF(user defined function) ? What formula/expression/equation for velocity has to be used for an airfoil simulation? Could you direct me towards - how can this be done in UDF!
Your help is much appreciated.
Thanks.
Somanna Subbaiah Refering user guide is best way to find the solution. The following two link may be useful to set the transient boundary conditions:
Question
PLEASE I am trying to add a lag to this code after each period. Does any one have an idea how to do that?
"#include "udf.h"
{ face_t f; real t = CURRENT_TIME;
{ F_PROFILE(f, thread, position) =A*sin(w*t);
} end_f_loop(f, thread) }"
Basically, I want the loop to initially run for "X" seconds, stop and then start again at "Y" seconds instead of it running continuously as default.
Hi Victor,
I hope the below mentioned link helps you
You can change the logic depending on your requirement using conditional statements.
Question
I would like to start a discussion of this specific topic.
Here I would like to discuss the list of possible techniques helpful for performing the simulation of oscillating bodies in quiescent fluid.
This discussion is open to all the students, teachers, and researchers.
I request you to reply here if you are familiar with code development in OpenFoam, IBPM, NEEK1000, lilypad and CFX
Pradyumn Chiwhane I am posting here a previous answer I provided on submerged oscillating bodies in quiescent fluid. The total force exerted by the fluid on the cylinder, you should consider besides the drag the added mass force. Academic references are provided within the following research projects:
Question
I guess my question is quite simple: you know how for compressible CFD codes we have the Sod Shock tube problem that we can use as a benchmark. What if I now want to expand my code and add chemical reactions to it, what would be a good/similar test problem that I could use to validate how well my code runs?
According to the link provided above, one may be tempted to suggest a simple combustion test case involving hydrogen oxidation to validate the "in-house" developed chemical kinetics CFD code. Thanks.
Question
I have a structured vtk file. I would like to convert this to OpenFOAM format in the quickest possible manner. There is a vtkToFoam code library - that is available - however, that is only for unstructured VTK data.
I have just come across your question. Maybe you already found the solution, but I wanted to add this answer in case it is still useful to you or others.
You could try converting from structured to unstructured grid with VTK and later convert to FOAM with the built-in vtkUnstructuredToFoam tool. A starting point would be adding a structured VTK reader and later following the approach in the following thread to write an unstructured one: https://public.kitware.com/pipermail/vtkusers/2016-November/097119.html.
Hope this helps too.
Kind regards,
Carlos.
Question
Hello everyone
I have a question can we use an ion exchange membrane for peptide separation from animal blood or plants for example alfalfa plant? if yes then how it will works, I mean how peptide will divide into ions? will amino acid will convert into amino and carboxylic ions?
I read few papers on it but didn't find any helpful paper on it, which give me detail information of peptide separation by ion exchange membrane.
thank you
Irfan Ali
Question
We adopted the famous open source CFD code, openFoam, and the finite element software code_aster in some applications of cardiovascular biomechanics, but havn't using them together to solve fluid-structure interations problems in this field. So we wonder whether they can be used together for solving FSI problem? and if yes, how?
You can use special packages:
1) precIce
2) openPalm
Question
Hello;
I am currently working on a UDFusing the DEFINE_HET_RXN_RATE for Heterogeneous reactions. My idea is to use VOF to describe a simple method of VLE using the vapor pressure of condensable components (in my case water and methanol). I am using the Evaporation-Condensation UDF provided by Ansys in their manual UDF book as a baseline.
By now, I am having trouble with filtering the rate of the reaction based on their names. I was trying to use STREQ and !strcmp command, but every time I compile it gave me the following message:
• error: member reference base type 'real' (aka 'double') is not a structure or union
Besides a problem with an exponent where its values depend on the temperature, it is the only problem I have so I can test the UDF.
Question
I have a question on Cp in the wind turbine. I have calculated the moment in the z-axis as my rotor also rotors along the z-axis. I got the moment values from my simulation. I applied the procedure which ansys recommended formula (P= torque x rotational velocity) for extracting power from the turbine. I got huge discrepancies between actual and theoretical. After calculating power, I have calculated Cp it comes around 0.8 to 1, but the Betz limit is 0.59. plz help me to calculate the Cp.
Conditions :
Turbine Aera =17.5 m2
R=3.5m
V=3
TSR=2
Fluid water (990 is the density)

Rajasekarababu Kb please follow the video and the steps elaborated i hope it will help you a lot .
Question
Hello,
I have been trying to model evaporation at temperatures far well below 100C in Fluent. This is primarily driven by the vapor content of air at the water-air interface.
A saturation temperature UDF is attached below.
The setup this is used with has 2 phases, one a species mixture of air and water vapor and the other is water.
After some help from the forum, I have got it up and running and it seems to be performing fairly well in transient simulations. However, when I try to use this code to calculate the saturation temperature for any steady-state simulation, I get a floating-point error. This is sometimes instant and sometimes after a few iterations. An example error message is:
Error at Node 0: floating point exception
Error at Node 1: floating point exception
Error at Node 2: floating point exception
Error at Node 3: floating point exception
Stabilizing pressure correction to enhance linear solver robustness.
Stabilizing pressure correction using GMRES to enhance linear solver robustness.
Divergence detected in AMG solver: pressure correction Stabilizing temperature to enhance linear solver robustness.
Divergence detected in AMG solver: pressure correction
Divergence detected in AMG solver: pressure correction
Divergence detected in AMG solver: pressure correction
Error at host: floating point exception
I can't understand why I am running into this issue. Is there anything I could try to remedy the problem? I have tested on many geometries, with a variety of problems. Is this UDF unsuitable for steady simulations? and if that's the case then what alternatives do I have? I really need this functionality.
I thought it may be because the system varies a lot so I set up a closed system with a little water in with the walls set to a temperature of 300k and initialized it at 300k. My logic was that the only thing left to solve was the vapor fraction. I got a simulation to run 10000 iterations. However, the vapor fraction was 1.0 everywhere in the gas phase leading to relative humidities many times larger than 100%. This makes me worry there is something wrong with the UDF itself. I know that this kind of study must be possible somehow as I have read papers of people doing similar things, yet these don't go into enough detail for me to successfully imitate.
Any help is appreciated.
Cheers
#include "udf.h"
#define MOLAR_MASS_WATER 18.01534 //g/mol
#define MOLAR_MASS_AIR 28.97 // g/mol
#define RHO_WV 0.5542 // kg/m3
#define RHO_AIR 1.225 // kg/m3
DEFINE_PROPERTY(saturation_temp, c, t)
{
// t: mixture thread
// c: cell variable
// Cell volume
real vol = C_VOLUME(c, t);
// Get the volume fraction of both phases
real vf_s = C_VOF(c, st);
real vf_p = 1 - vf_s;
// Get the pressure of the mixture
real p_mix = C_P(c, t);
// Get the operating pressure
real p_op = RP_Get_Real("operating-pressure");
// Primary phase density
real rho_p = C_R(c, pt);
// Get mass fractions in primary phase
real mf; // Array to store mass fractions
Material *m = THREAD_MATERIAL(pt);
Material *sp = NULL;
int i; // Species index - 0 for water vapor and 1 for air
mixture_species_loop(m, sp, i)
{ mf[i] = C_YI(c, pt, i);
}
real p_w; // h20 pressure for cell
// If secondary phase only
if (vf_s == 1)
{
p_w = p_mix + p_op; //****** I'm not sure if this is right *******
}
// If primary phase or mixture of phases
else
{
// Find the partial pressure of water vapour
// partial pressure = cell pressure * water mole fraction
// mass of primary phase in cell
real m_prim = rho_p * vol * vf_p;
// mass of water vapour and air in cell
real m_wv = mf * m_prim;
real m_air = m_prim - m_wv;
// No of moles in water vapour and air
real N_wv = m_wv / MOLAR_MASS_WATER;
real N_air = m_air / MOLAR_MASS_AIR;
real N_total = N_wv + N_air;
// water vapour partial pressure
p_w = (C_P(c, t)+ p_op)* (N_wv / N_total);
}
// Calculate saturation temperature
real t_sat;
t_sat = (1730.63 / (10.196 - log10(p_w))) + 39.724;
return t_sat;
}
Hayder Ibrahim Mohammed I would definitely be interested in seeing your solution to understand what you mean, Thank You!
Question
Hello, we have a CFD code written in MATLAB and we wanna save the calculations at a specific node to a text file like ANSYS FLUENT..Any suggestions please?
We will be extremely grateful!
Thank you!
Dušan Regodić when I export like this currently, I still have to manully go through the files after and add ".txt". Is there any way to get Fluent to export as a true .txt file so as to skip this step?
Question
My goal is to study the pressure drop in the tube for different combination of number of fins, fin height and fin width. The internal fins have a certain helix angle and there are a number of fins. The tube has one inlet and one outlet. Since the fins are arranged in a helical pattern, a single helical strip of one helix pitch length is to be modeled. I can understand that a transnational periodic boundary condition can be applied between the inlet and outlet of one strip of the fin, but I am not sure as to how would the sides of the fin can be modeled. I have one reference where he applies rotational periodicity to the sides of that one single strip.I went ahead with the reference, but I got absolutely wrong results. The pressure drop was of the -10^4 order,which is not even close to the reference measurements. The residuals were close to 10^-6 for all the equations.I am using 4 meshed-domains ;2 for connecting inlet and outlet and 2 for connecting the side faces of the helical strip. I applied the periodic conditions through "Mesh--> modify zones--> make periodic" through TUI option in Fluent,however I got a bit confused when a started to input the "mass flow rate" in periodic operating conditions.There was only periodic operating conditions input, so for which PBC I was entering the mass flow rate-rotation and translational ? The model being used is RANS SST k-omega. I also went through the "periodic repeats " option thinking that I have two periodic zones adjacent to each other, but it's usage was for something completely different. Also,since I have gone into a considerable detail, I also want to know whether it's possible to have mixed type boundary conditions ,for example, can I have translational and rotational boundary conditions on two faces of an hellical geometry, such as this pipe?
Junchuan Hou, I made it as explained in the reply of May 24, 2018. Please read it. I applied heat flux on the top wall. I modeled both the solid and fluid regions.
Question
I need to measure the water depth in the cylinder ( the picture attach) that mixes with air in Ansys CFX, and I don't find an excellent expression to do that.
Hamidreza Razavi But from the provided image this does not look like very much like a flow with a clearly defined free surface? I wonder what causes in your application this rather diffuse mixing of the gaseous and the liquid phase - in particular the remaining liquid phase volume fraction above the green area? Are you sure, that you have a sufficiently converged solution here? Even visually I would do rather hard to determine a location of a "free surface".
Regards,
Dr. Th. Frank.
Question
I'm using Ansys Fluent software for CFD simulation and I'm gonna to learn CFD coding and optimization and also UDF.
Thank you;
Matlab is very good to start programming simple CFD codes. Then, according to the progress you achieve, you have to consider Fortran or C++. This latter is required if you want to program subroutine for OpenFOAM.
Question
Dear all,
In my simualtion domain, I need to use mixture of gas ( N2 gas with 20% CO2) at INLET in ANSYS Fluent.
Mixture model, and species model, may be these models work. Actually, I need your support to notify the model and how to put the above specifications on that model too.
Regards
You shall especify on models that Species are ON. So, when you turn ON Species, you are able to select some mixtures that are by default in the program library (you can select methane-air which contain the Species you need or create a mixture in Mixtures). Then, you go on Boundary Conditions and Inlet and you now are able to use that mixture that you have selected and specify the molar or mass fraction of each specie. Regards.
Question
Hi there. Im writing a program in C to solve the viscous burgers equation in 1D using the finite volume method. I am currently using a structured uniform cartesian grid as my computational grid. However i want to implement adaptive mesh refinement in my program. Could anyone tell me the steps i should take in order to do this. Would i have to make i have to make an additional function like say Adapt_Mesh() as well as my Init_Mesh() function and call the Adapt_Mesh() function in the main time loop every time the mesh needs refinement and how could i go about determining if my mesh needs refinement or how would i go about this. Im relatively new to the realm of CFD hence im struggling a lot by thinking how to go implementing this. Could anyone help me. Id be willing to share my current code if anyone could point me in the right direction in regards with how to get started.
*EDIT: Also i have a current gird with 100 cells. If was to adapt the mesh would it refine the mesh so that NX is always 100 ie. by making areas of less density and areas of higher density so that the total points add up to 100 or does the adaptive mesh increase the number of total cells everytime the mesh is refined. This is something im unsure of.
If anyone is curiosus i have attached my program below just incase anyone wanted to take a look
If you want to increase your definition step by step, you can add a parameter to your array or similar data structure:
-step 1 a[i,j], that's your current description with large cells
-step 2 a[i,j,k,l], that's the higher resolution with smaller cells in each of the previous large cells
within the neighborhood of each (i,j), you introduce further divisions (smaller cells: parameter k horizontally and l vertically)
etc...
In this way you can always go back to less definition.
Question
I have a case, which is about internal flow with constant heat flux. Although the inlet boundary condition is laminar, the flow is passing transition and turbulent regime along the tube. As known, the intermittency term is 1 (so, admitted as turbulent inlet BC) for freestream velocity for external flow, I would like to learn that whether using the transitional SST model by laminar inlet boundary condition in the pipe is the corrects way or not.
Best regards,
The problem I faced while using SST I need to put the value of turbulence intensity at the entrance, and if I specify it to zero then my solution does not converge.
Question
hi
I am working on the validation of the case which is "simulation of the flow around a circular cylinder at Re=3900 by using XFLOW software " .my boundary conditions is shown in the attached pic. the top and bottom and span wise sides have "periodicity" boundary condition.
my problem is about lift coefficient. my drag is matching with experimental data but my lift isn't. actually lift coefficient in compare with my drag coefficient changes more with decreasing mesh size and become far from experimental data with decreasing mesh size. why does lift coefficient change in this way?
are my boundary conditions true or not?
another thing i want to know is how must be the shape of drag coefficient- time graph at 3900 Reynolds? does any one have a pic or reference?
Theoretically, the flow around a circular cylinder will produce unsteady vortex street, both the lift coefficient and the drag coefficient oscillate with time. The time averaging method of transient calculation results will affect the final results, first of all, it is necessary to ensure the consistency between the numerical results processing method and the experimental processing method.
Secondly, the inflow conditions may have an impact, such as the turbulence intensity, dissipation ratio and other parameters should be consistent with the experimental results. And if the URANS method is used, it is better to use the convergence of the grid for numerical verification and validation, rather than grid independence.
If the RANS / LES hybrid method is used, it does not mean that the finer the mesh is, the better, the results of the calculation and the grid have no monotonous convergence results, that is, the mesh refinement can not bring more accurate results.
Other possible reasons include the grid distribution in the boundary layer, not just the grid refinement in the main flow region, whether the time step can satisfy the unsteady calculation and so on.
Question
I am trying to simulate a heterogeneous reaction between two phases in Eulerian multiphase model. I have written a UDF and it compiles and runs well. The reaction is: C+2H2--> CH4. Although my solution shows reasonable values for reactions rates, but I do not see any changes in Hydrogen concentration from the inlet gas. Can anyone where the problem is arising from?
Hi, I am trying to model gas/solid multiphase granular flow with chemical reactions in Fluent. The solid phase is FCC catalyst together with the coke (hydrogen + carbon) deposited on its surface and the gas phase is oxygen. But I have some problems. 1. When modeling this, should I use both species transport and heterogeneous reactions in multiphase interaction module? 2. How to define solid phase in the materials section as FCC catalyst (granular) together with the coke (hydrogen + carbon) deposited on its surface? Thanks...
Question
In the CFD area, it is common sense to set interfaces between two bodies that have different meshes. My questions are:
1) Which set of variables are mapped between two different meshes on the interface? For example, Velocity? Or Massflow?
2) How the solver solves the fields between the interface? Are the fields in the two bodies (on the two sides of the interface) solved together or separately?
I don't think, that your question can be answered independently from the concrete implementation of a CFD code.
1) usually a conservative formulation in terms of transferred massflow across the interface (i.e. mass flux, momentum flux, energy flux, conservation of species concentrations).
2) For sure dependent on the CFD code implementation.
For parallelized codes, each body usually represents at least one partition in terms of the applied domain decomposition for the purpose of parallelization (can be split in several partitions). And then a solution matrix is computed for the partition with appropriate coupling on the partition interfaces throughout the iterative solution process, which usually involves (MPI) communication between different processor cores of the parallel machine with data exchange on the partition interfaces. During that communication and data exchange it has to be handled, whether this data exchange is related to a conformal or non-conformal partition interface.
Regards,
Dr. Th. Frank.
Question
Hello everyone, hope all is good.
I want to analyse multi-phase fluid flow through pipe, which software is best to do so ?
Go for Ansys CFX or COMSOL.
Question
Hello,
As part of simulation of gases mixture and water, I need to calculate viscosity of the fluid components and I am using relationships proposed by Chung et al. (1988).
The irony is while I am able to validate that I have coded the relationships well for gases like methane, oxygen but when I am trying to do with water, there is drastic difference, especially for T between 300 K and 700 K.
In order to check if it is only in my case, I was able to find an article where the authors are closer than NIST/CoolProp data base.
I also need to evaluate conductivity and I have same issues for water. In the temperature range mentioned, the conductivity even goes negative in some regions.
I am not able to understand how come it shows this anomaly only in case of water.
May some one help in this regard.
Thanks
(P.S: I can share more info if required. Thanks)
Hello,
I also thought the same but I even when I manually entered the correct density in the code for particular condition, it did not make much difference. But what was more surprising is that my density profile matched quite well with the one given in paper but not viscosity / conductivity. I was just wondering if something in particular had to done for the case with water.
Thanks
Question
I am developing a solver to simulate compression of oil in shock absorber filled with viscoelastic compressible oil. The model will consider the loss due to viscosity which will decide the response of damper to the shock it experiences. Please include any link or document you think curucial for this.
I have made models for incompressible flows but I am having a hard time to find resources for this case.
Thank You!
Thank you A.N.M. Mominul Islam Mukut ! This document gives serious insight to my problem as well as implementation.
Question
Since Abaqus CFD is no longer available in newer versions what are other available codes for Fluid-Structure Interaction Simulation
Dassault Systemes XFlow is easily coupled with Abaqus. See for instance https://www.youtube.com/watch?v=-V4Nlp9pSMc
Question
OpenFOAM is a great open-source CFD code offering impressive accuracy and robustness for free, however, for CFD users who are interested to switch from expensive commercial software like CFX, Fluent, Comsol, etc, it has a steep learning curve, and also it is time-consuming for big projects. To bypass this limitation, Simscale and Simfow have developed a graphical user interface with OpenFOAM CFD code at its core, but you have to pay a license fee. I am interested to know if there is any open-source graphical user interface for OpenFOAM.
Thank you for your suggestion Jorge Rey Martínez , at present I am using Ansys CFX and Fluent, as you mentioned sim-flow is free for small projects only, my calculations are mostly large so there is no point changing one commercial software with another, I am interested to switch to a completely free CFD package that is convenient to use. So far I have found two opensource/free GUI for OpenFOAM, HELYX-OS (paid for windows but completely free for Linux) and CfdOF (a workbench of FreeCAD, completely free) worth exploring.
HELYX-OS
CfdOF
Question
Assuming two-dimensional flow, I'm trying to implement a code for a quasi DNS problem. There is no doubt that i should replace the velocities in Navier-Stokes equation (NSE) with its equivalent velocities in the form of u=u_base + uf, where u_base is the steady state solution for NSE for the channel flow and uf is the perturbed velocity which varies with time. By the new definition of the velocities, one can get new extra terms in NSE, as a function of u_base and uf. My point is to find the fluctuation behavior with time so that i can calculate the growth rate and start an instability study for the flow field.
There are two forms of the new NSE, maybe more but at least these two were the common equations which i found in most of the researches which i read. The first one is in the form of du/dt + div(uu) = - dp/dx+ iv(grad(u))/Re where u was defined earlier. The second form is: du/dt + div(uu) = - dp/dx+ div(grad(u))/Re - omega x u.
Which one should i use for the purpose of instability studies?
Note: You can check the attached files for the non-conservative form of the two previous models.
Ijaz Durrani
I really appreciate your suggestion. Unfortunately, the authors were using an averaged model, which is not the case i'm looking for.
Question
Dear all,
I want to simulate the distribution of relative humidity inside an agricultural greenhouse. I have modelled the relative humidity in fluent using the Species model. the model works perfectly, but when I display the relative humidity contours, sometimes it exceeds 100% !!!
I know that is normal because Fluent uses a mathematical formula to calculate the RH.
but what I want now is to ask if i can write an udf to modify the results of relative humidity as follows:
if RH > 100 ----> Rh = 100??? or does anyone have another solution!!!
I'd be appreciated for any help.
Dear, K. Ezzaeri please what is the procedure you followed to model the relative humidity variation in fluent. and thank you
Question
Hi all,
I am modeling a batch reactor which is a cubicle box with micrometer dimension. Inside this box  there is a liquid water along with a specis A which is getting converted into B through heterogeneous reaction. B is a solid phase. So i am using multiphase eulerian model. initially there is no phase B. After sometime there will be specis B in the system.
But what i see is that total mass is increasing with time in the system. why is this happening?
Thanks
Vivek
Hi Vivek
I am facing a similar issue while using multiple species in liquid phase. The issue apparently is on using the Volume weighted mixing law for density calculation of mixture.
While debugging, I tried to simulate a simple case, with only species transport with 2 species in a mixture. When I use volume weighted mixing law for calculating mixture density, there is a mass imbalance, whereas when I use incompressible ideal gas law, mass is conserved.
Were you able to find a solution to it? Please let me know if so, and it'll be of great help.
Thanks
Simar
Question
I have mostly come across second-order spatial and temporal accuracy using projection/fractional step method. The spatial derivatives are descritized using second-order approximations. For the temporal accuracy, Kim and Moin use Adams-Bashforth for the convective term and Crank-Nicolson for the viscous terms. However, second order accuracy may be insufficient when one deals with transition or DNS studies. To extend to higher-order accuracy in time, what are the possible schemes, one can use? Can I use WENO (5th order) for space, RK-4 for time? What happens to the poisson equation? Do I need to discretize the second derivatives of pressure using higher-order approximations of Taylor series, instead of the conventional second-order approximation? Any ideas you have may be helpful. Thanks in advance.
I think that the discussion stil misses of an issue. The projection method works projecting a provisional (i.e.,intemediate) velocity field onto the space of divergence-free field. The spatial and temporal accuracy of the intermediate field can be higher as you want (provided the correct intermediate BCs are provided) but that does not mean that the final divergence-free velocity has the same high order accuracy.
What misses in the discussion is the splitting error that is introduced in the formulation. Velocity error and pressure gradient error can interact, the global accuracy being lowered. That happens also if you define the intermediate velocity as a continuous field (that is supposing a perfect integration).
Question
Hello all,
I am looking for an method / algorithm/ or logic which can help to figure out numerically whether the function is differentiable at a given point.
To give a more clear perspective, let's say while solving a fluid flow problem using CFD, I obtain some scalar field along some line with graph similar to y = |x|, ( assume x axis to be the line along which scalar field is drawn and origin is grid point, say P)
So I know that at grid point P, the function is not differentiable. But how can I check it using numeric. I thought of using directional derivative but couldn't get along which direction to compare ( the line given in example is just for explaining).
Ideally when surrounded by 8 grid points , i may be differentiable along certain direction and may not be along other. Any suggestions?
Thanks
The answer to a question about the numerical algorithms for resolving the issue of differentiability of a function is typically provided by the textbooks on experimental mathematics.
I recommend in particular: Chapter 5: “Exploring Strange Functions on the Computer” in the book: “Experimental Mathematic in Action”.
For the review please see
You can also get a copy of the text in a form of a preprint from
Judging by the quote placed in the beginning of Chapter 5, the issue of investigation of the “strange functions” was equally challenging i 1850s as it is 170 years later:
“It appears to me that the Metaphysics of Weierstrass’s function
still hides many riddles and I cannot help thinking that enter-
ing deeper into the matter will finally lead us to a limit of our
intellect, similar to the bound drawn by the concepts of force
and matter in Mechanics. These functions seem to me, to say
it briefly, to impose separations, not, like the rational numbers”
(Paul du Bois-Reymond, , 1875)
The situation described in your question is even more complicated because the function is represented only by a few values on a rectangular grid and it is additionally assumed that the function is not differentiable at a certain point. In this situation I can suggest to use the techniques employed in the theory of generalized functions (distributions).
For a very practical example you can consult a blog: “How to differentiate a non-differentiable function”:
In order to answer your question completely I would like to know what is the equation, boundary conditions and the numerical scheme used to obtain a set of the grid point values mentioned in the question.
Question
Many comercial and free code provides some options for modeling non-Newtonian flows.
Which one is very simple to use and appropriate for sludge flow?
Bachir Achour has given Good Suggestion
Question
The Error as Follows:
Clearing partially read grid.
1028289 nodes.
5971754 tetrahedral cells, zone 29.
53145 tetrahedral cells, zone 30.
28 tetrahedral cells, zone 31.
3 tetrahedral cells, zone 32.
3 tetrahedral cells, zone 33.
31 tetrahedral cells, zone 34.
35 tetrahedral cells, zone 35.
2 tetrahedral cells, zone 36.
31 tetrahedral cells, zone 37.
2 tetrahedral cells, zone 38.
2 tetrahedral cells, zone 39.
27 tetrahedral cells, zone 40.
1 tetrahedral cells, zone 41.
5 tetrahedral cells, zone 42.
53 tetrahedral cells, zone 43.
1 tetrahedral cells, zone 44.
3 tetrahedral cells, zone 45.
10 tetrahedral cells, zone 46.
3 tetrahedral cells, zone 47.
1000000: Unable to allocate storage [323.06MB] for 12098307 faces.
Reading Faces: failed while reading section 13.
Clearing partially read grid.
Error: Read_Grid_Section: Aborted due to critical error.
Error: Read_Grid_Section: Aborted due to critical error.
Error Object: #f
I too facing same problem what to do?
Question
Dear all,
I'm doing a two way FSI problem with Static Thermal and Fluent as my systems. Something like the video attached. While solving the system coupling threw the following error: "Update failed for the Solution component in System Coupling. The coupled update for System, Fluid Flow (Fluent), threw an exception."
In total there were four errors. See the image attached.
Anyone with any suggestions or advice is appreciated.
Regards,
Nikhilesh
"Update failed for the Solution component in counterflowHX. The Solution component in counterflowHX does not contain all entity types advertised in its component template, even after update"
any one who can give me idea how to resolve this error in ansys.
Question
Dear Researchers
FSI simulation in the biological fluid problems
Ansys-Fluent or Abaqus or Adina?
You know that solving the fluid and structure equations as a couple equation is very valuable for FSI simulations. The power of software in the easy meshing of the biological model obtained from MRI is also important.
However, how much is the solving of fluid and solid equations simultaneously worth?
According to the aforementioned concerns, which one of Ansys-Fluent or Abaqus or Adina software is better for biological fluid simulation such as blood circulation analysis in the vessels.
Regards
In my opinion all of them are good for performing FSI. I prefer Fluent since I worked with it quit a bit and liked it very much. However, another factor that plays an important role is how many physics are contributing to the model. I performed a coupled Structural-Thermal-Electrical multiphysics analysis in conjunction with a Thermal-Fluid-Structure interaction analysis and published it in ASME. It was a very time consuming process with the computation resources. I had available at the time. I put the link below for you if you are interested in.
Thanks,
Question
Dear researchers,
I am working on developing a reliable and accurate COMSOL model to investigate the inertial focusing of particles inside micro-channels. Although I add and define the lift forces (wall-induced and Saffman) and drag forces correctly, my results are incorrect. I believe that COMSOL's wall-induced and Saffman lift forces are not working properly. What can be done?
I would appreciate your insights on this matter.
I faced such problem in COMSOL 4 years ago. I was simulating an impact problem. At the end when I read the COMSOL user manual it is written that for impact problems COMSOL does not work well for such cases unless some conditions need to be checked. Therefore, I would recommend you to read COMSOL documents to see if any conditions need to be checked for your case.
Good Luck
Question
Hello,
I went through ansys fluent dynamic meshing guide. It says remeshing can be done only on tetrahedral mesh. I still tried to implement it on hexahedralmesh. It works well. It is bit misleading for me that, when manual says it works for tetrahedral only. I din't encounter any problem. Am I correct in implementing remeshing on hex or wrong?
Many people implement smoothing and remeshing only on tet mesh. None did on hex, so I am confused.
Any lead or document or answer would be a great help.
Regards,
Naveen
You are welcome dear Naveen Shirur .
Question
I'm trying to develop a code to solve the stream function-vorticity equations using the Finite Element Method in order to simulate a 2D incompressible flow problem. I was wondering what the pros and cons are, whether coupling a turbulence model is possible, whether formulating the boundary conditions may face difficulty and whether the evaluation of the pressure field is flawed possibly due to decoupling of the pressure variable from the governing equations. Note an accurate evaluation of the pressure field is particularly important for my case of study.
I very much appreciate helping me out.
Dear
Tapan K. Sengupta
I have included the link mainly to show the importance of the vorticity equation in the actual meteorological applications.
Concerning the questions: “ If possible, then please explain how one can link vorticity equation with energy transfer. Is it via enstrophy? Wouldn't that be indirect based on some model in mind?”
We work with three theoretical models to describe energy transfer: 2-D turbulence, 3-D turbulence and QG (quasi-geostrophic) turbulence.
In 2-D turbulence we have conservation of both (kinetic) energy and enstrophy. According to Fjørtoft (1953) there is only transfer of energy from small to large scales. The opposite situation is observed in 3-D turbulence with the well known downscale direction of the energy transfer. In atmospheric large scale problems the quasi-geostrophic turbulence exhibits characteristics of both regimes because the vortex stretching mechanism is present in a QG vorticity equation. This fact is not always acknowledged and it often wrongly assumed that the large scale atmospheric turbulence is described by a 2-D model.
Question
I'm doing a simulation to determine maximum lift for a two elements wing, 30 degrees flap angle. by alternating the angle of attack.
I'm using second order accuracy K omega SST model (Re=10^6) with the transition and low Reynolds's correction turned off using ANSYS Fluent, so the model (as i read) uses wall functions as default for this case.
my Y+ is between 0 and 20, i found out that i either have to be less than 1, to use near wall modelling, or use wall functions for Y+ between 30 and 300, but my problem is that i'm between both ranges, will this affect the solution accuracy and detect separation correctly ?
Thank you
However, there are other influential factors that you have to keep in mind when you are using Y plus:
1. Y plus is an analytical profile near-wall section for relaxing modeling from the calculation of near-wall boundary layer. In other words, using y plus, you dong need to apply a grid for the boundary layer. By the way, it is essentially designed for flat plate and so care must be done when you are going to use it for separation zones or non-flat walls.
2. The reason why you need to calculate boundary layer thickness lies behind this fact that the y plus region must comprise only the viscous sub-layer and buffer layer. To this end, a very small or big Y plus may shift your Y plus profile outside or inside of the buffer layer negatively and it is a key here how to deal with this issue on the surface of your model. In fact, very small y plus or big y plus may lead to inaccuracy if they employed in the wrong region respect to the boundary layer.
Question
I am working on cross flow condenser.I have made CFD code based on it. My total mass should be 2.817kg every node. I am getting range of 2.817 to 3.192 kg. My highest error in percentage in some node is around 3 percent and lowest is around 0.2 percent. Can I consider my CFD coding is acceptable?
Hi dear Parnab Saha ,
Yes, I agree with Khalid M. Saqr . In addition, please try to reduce the residual values.
Regards.
Question
Particularly i am having confusion in deciding boundary condition for swirl part.
Thanks all of you for the discussion.
Question
The origin of many, if not all, vascular diseases can be correlated with endothelial cells (ECs) mechantransduction. The mechanosensory of ECs is strongly linked to the physics of blood flow. CFD models of vascular blood flow can provide insightful information about the hemodynamic environment associated with different vascular disease. Hence, CFD can contribute to the research on ECs mechanotransduction. However, since blood flow is inherently multi-harmonic pulsatile flow and vascular geometry have complex 3D morphology, CFD models require rigorous validation practice in order to ensure that their results are as valuable as they are considered to be.
I would like to discuss the previous efforts conducted to provide consistent, reproducible and physically meaningful validation procedure for CFD models of pulsatile flow for vascular hemodynamics applications. Is there any validation resource available for public access? What would a good and reliable validation database include?
Thank you Dr. Kartik Jain for the informative response. I have used many of these validation datasets in my early CFD work on turbulent combustion modeling. However, pulsatile flow is quite different from fully developed flow, especially when it comes to transition to turbulence. The FDA nozzle benchmark is dealing with fully developed flow too.
As to the mesh convergence tests, of course it's a good way to establish benchmark for evaluating the numerical error in a CFD model. Similar to Richardson extrapolation or any of its variants, mesh convergence estimates the error resulting from discretization scheme. Validation, on the other hand, aims at estimating the error resulting from the physical model and assumptions in the governing equation (such as viscosity closure).
Question
An aircraft is consist of many sub-parts , while estimating the Reynolds number and y+ value first layer height which length do we consider as the characteristic length to be used in the respective formulas ?
The characteristic length is used in determining dynamic similitude. The ratio between inertia and viscous forces called Reynolds number depends on a characteristic length.
The given answers are useful, however, I would like to add:
1. In general, the smallest available length scale is the characteristic length scale.
2. Sometimes (e.g. in dynamic systems) there is no fixed length scale to choose as a characteristic length scale. In such cases often a dynamic length scale can be found.
The determination of characteristic length shifts its dependency on for what purpose you want to determine it?
for R/L≪1R/L≪1, RR is the characteristic length scale; for R/L≫1R/L≫1, LL is the characteristic length scale. This implies that the smaller length scale is (usually) the characteristic length scale.
Aamir Sultan Your question is a practical, empirical question, not a theoretical one that can be "solved" by mathematics. One way to answer it is to start from what Reynolds number means physically: it represents the ratio between "typical" inertia forces and viscous forces in the flow field.
Question
Hi everyone ,
I am implementing Acoustic model in FLUENT. Geometry is 2D. By using FW-H model, I am facing difficultly to understand these things. ( I have already read FLUENT manuals and one tutorial )
1) It is very important and necessary to define accurately Source Correlation Length in 2D geometry. I do not know this parameter. how to calculate it. my geometry is very simple, just a rectangular to 10*20 mm.
2) What should be the source zone and type ? In 2d-cylindrical tutorial, I read it is a cylindrical wall. My geometry have 0.5 mm inlet a bottom. Is it the source zone and type will be Velocity INLET ?
3) Where will be the receivers position ? I have to monitor the the time history when gas passes through from INLET ? I read one paper there was one monitoring point which is away form the inlet.. I could not understand.
4) What is FW-H integral surface ? I think, the under investigation portion has very fine mesh. this is called FW-H integral surface. But I am not sure about it..
Any type of advise, guideline or tutorial will be highly appreciated. Thanks in advance..
If the case is solved using pressure based solver, the EOS and Acoustic features can be defined for the materials, but I'm not sure if it is correct for multiphase flow. As we know，Walli's sound speed should be used for Homogeneous bubbly flow.
Question
I am trying to solve the flow over a solid sphere by using a finite volume method in the spherical coordinate system. I have discretized the Navier Stokes equation as per the Patankar Power Law Scheme. But I am not getting any results. I am attaching here my source code. If anyone has worked on the spherical coordinate system, kindly respond.
Thank you very much sir for your reply.
I would definitely give my full effort in learning unstructured cfd simulations.
Kindly refer me some good books on unstructured cfd method.
Question
If the nodes of the mesh are updated by specifying the increment in the radius of the sphere (dR-which is calculated based on a set of PDEs), what is the best way of decomposing the mesh for parallel processing? Is it possible to use one of the existing decomposition methods in openFoam (i.e. hierarchical/manual/metis/multiLevel/scotch/simple/structured) or should the cells be manually allocated to each processor?
You can see some examples in YouTube
Question
Can anyone an expert explain with examples or tutorials how can convert pump as a turbine using CFD code?
A pump does not physically work as a turbine, therefore you cannot convert it in any way.
Question
Hello Everyone ,
I was wondering is there any literature available on the extent of transitional regime in space and that for how long does it last ?
Regards
Aamir Sultan
This question is big and open-ended. Transition is linked to the growth of small instabilities in the flow field, but the link is not straightforward. The physics involved include the external flow field, the pressure gradient and of course the geometry of the solid surface (if present) adjacent to the flow field. In a simple analysis, the region that interests you is confined between the points of instability and transition. That distance delineates the spatial region while the temporal factor can be determined by the timing (speed) of the external or main flow field. If you are interested in the details, I recommend you consult Chapter 17, "Origin of Turbulence II" in Boundary Layer Theory, 7th. Ed., the classic text by Hermann Schlichting. I would suggest starting with Section b. "Determination of the point of instability for a prescribed body shape." There are a number of figures containing data that can help elucidate the extent of the transition region based upon certain assumptions regarding your geometry and flow field. This section will also refer you to other sections of the text for related information. You will not find a concise answer for your question, but this reference will provide a lot of relevant insight for you. Unfortunately, time will be required to go through and process the knowledge contained within.
Question
Does continuity , momentum and energy laws remain conserved when we use local refinement in adaptive meshes ?
yes
Question
Hello Everyone !
It is alway said that SA model is apporopriate for adverse pressure gradients then how come it lacks the ability to accurately predict separation ?
It depends on your simulation's circumstances, for example, input boundary condition should be rechecked.
Question
Hello Everyone
I am simulating an airfoil at Low Reynolds Number flow Regime Re=10^5 , in this particular case a laminar boundary layer separates , forming a laminar separation bubble , then transition to turbulent and reatching to the airfoil . Is SA model capable of simulating such kind of flow in which three 'different behavior of flow exists ?
Regards
Question
I wrote a CFD code in Delphi for turbulent axisymmetrical pipe flow (incompressible - SIMPLE - exponential discretization - staggered grid).
Epsilon diverge during Gauss-Seidel point to point iteration. Should i calculate k first by setting epsilon to zero? Any suggestions for the sequence.
Right now, I am calculating coefficients of linear k and epsilon discretized equations first. Then Gauss-Seidel iteration initiates for point values of k and e. Then I return to calculation of coefficients again.
Dear All,
Thank you for your answers. I encountered a paper titled "Implementing a k-epsilon Turbulence Model in the FEniCS Finite Element Programming Environment". Although it uses finite elements, I saw that they are calculating the coefficients and variables in an order (at least this was what I deduced). Therefore I implement following procedure and had a solution:
1. Treat source terms half implicit half explicit: This means generations are left explicit and dissipation moved into main coefficient (implicit or source term linearization as Patankar named).
2. First calculate coefficients of k, then calculate k, then calculate coefficients of epsilon, then calculate epsilon, then calculate turbulent viscosity and repeat.
3. When calculating turbulent viscosity, limit its maximum value to for instance 1000 and if there is a limited turbulent viscosity point, calculate epsilon at that point by using limited turbulent viscosity and calculated k.
This procedure ensures that epsilon always have a proportionality with k.
I should also mention that in a recent book (Moukalled et al. - The Finite Volume Method in Computational Fluid Dynamics), i saw that they start solving epsilon first.
I should also mention that, the dissipation of k is linearized by writing e/k* where k* is the old k value of previous iteration.
I hope this information will be useful to someone.
Best Regards,
Eyub
Question
I need to simulate a 2-D problem with DGFEM. I have been advised to use C/C++ for a code that delivers quick and efficient results, however, I am not very comfortable with them, and my base code happens to be in MATLAB. Would Julia be a better choice than MATLAB, comparable to the performance of C/C++?
Julia is faster than Matlab, but I think the speedness of solution is not the problem, the most important issue is to write a correct code especially for complicated models, so I do not recommend using C language if you are a beginner in it.
Julia/Python/Matlab/R language are similar in simplicity. Julia is the faster.
You can see the difference in this sheet
Question
Hello Everyone ,
Hope you are doing fine . I have this question about the reference values , that which length should one use while doing external aerodynamic CFD simulation of a full aircraft . The main objective of the simulation is to get the aerodynamic coefficients values at different angle of attacks . Should I be using full length of the aircraft as the resulting boundary layer will be formed over whole of the aircraft length ?
Your kind suggestions in this regard will be really helpful .
Aamir
I do go with Dear François Morency for his answer.
Question
I got one really good paper on "Two phase modelling in ANSYS FLUENT", in which they have used UDF and linked them to Governing differential equations of VOF Model in ANSYS FLUENT. The Paper I have attached below, in which terms to be added as source term is also given.
I am going through UDF manual of ANSYS FLUENT and all the materials that I have with me for understanding how to link the source terms though UDF with the Governing differential equation of VOF model.
If you have any program written in C for adding the source term to governing differential equation of VOF model, please share your inputs on this topic
Thanks regards,
Somnath Rangrej
Please write your considering sources as formulas here. Maybe I could help.
Thank you.
Question
I have modelled a transient flow in a microchannel in ANSYS FLUENT using 100 timesteps. I want to export the velocity at each node in excell format for all timesteps simutaneusly. Although using the export command i can only do it for each time step individually . Please advice me how to extract velocity for all timesteps simultaneusly in excell format (does not matter if there is a diferent excell file for each timestep).
Hi, I'd like to add something which I did to extract the Fluent transient simulation results from CFDpost. I understand it's a late reply, but maybe it'll be of use to somebody.
First, I defined a plane in CFDpost. In CFD post (select standalone, otherwise 'play session' option won't be available if opened from ANSYS workbench). Now, go to 'new session' under the tab 'session' and create one. Now, click on start recording under the session tab, and do the operations required (like go to export, select the variables to be exported, define the filename etc...), such that this operation has to be carried out for n timestep solutions. Now, stop recording and open the session file. you may edit the session file (written in perl language) to loop these operations for 'n' timesteps. That's all!!!
If somebody is in a hurry and needs the edited session file, here it is... (not the entire txt, but only required modifications). I had 1000 timesteps and hence i=00001 to 01000 (first line).
!for \$i ("00001" .. "01000"){
true
EXPORT:
...
END
>export
!}
END
Question
Sometimes we hear somethings on stiffness problem of solution for chemical reaction modeling.
There is an option in Fluent software to figure it out.
Have you guys used it so far? tell us when and why did you use it?
As Pierre Mandel kindly mentioned, when characteristic scales of your problem are very far (orders of magnitude) you see Stiff Differential Equations (ODE or PDE), It means you have small stability region or it means you have second or third order "Bifurcation" which needs a very high order numerical solution schemes and small time (discretization in general) steps.
There are two types of stiff problems in modeling advection-diffusion-reaction (ADR):
- If you model single specie, when time scale of Peclet number and Damkohler number are very different, you have an stiff ADE (or ADR, or transport equation), you can solve it either by implicit solver or small time steps, or dual time step, or other numerical tricks.
- If you have multi-rate mass transport and your species are internally related (reactive transport), you cannot solve this problem with small time step. Mathematically you have to get integral of infinity and you are always unstable. Those problem can only be solved with implicit solvers (all species in one shot!)
If you need more information on this topic, a very good and classic source for learning is this book chapter:
Approaches to modeling of reactive transport in porous media
Carl I Steefel, Kerry TB MacQuarrie Publication date: 1996/1/1 Reviews in Mineralogy and Geochemistry Volume 34 Issue 1 Pages 85-129 Publisher GeoScienceWorld
Question
Guys, Sometimes after initializing the problem in Fluent and triggering the calculate button, a residual/residuals start from a big non-zero magnitude. For instance, to me, it in many cases happens for some convection-diffusion equation when I'm simulating combustion. Interesting point is that the results looks ok and have good agreement with experimental results. In this page:
It's said that:
"For most problems, the default convergence criterion in ANSYS FLUENT is sufficient. This criterion requires that the scaled residuals defined by Equation 26.13-4 or 26.13-9 decrease to 10-3 for all equations except the energy and P-1 equations, for which the criterion is 10-6."
As it is said, the residuals need DECREASE TO 10-3. Then it means that it doesn't matter from where the residual starts, it should finally decrease to 10-3.
1. Am I right?
2. What's your opinion?
Another question:
3. Why does it happans? (I mean why does the residual start from a non-zero magnitude?) and How to figure it out?
I've attached two screenshots of the residual of a project for instance.
In my honest opinion there are many situations where this statement from the ANSYS Fluent manual is rather misleading, if not even wrong. In particular in CFD simulations with strong heat and mass transfer almost the entire physics, material parameters and thermodynamics is bound to a veery good convergence of the energy equation. In my opinion a scaled residual (RMS Res) of 10^-3 for the energy equation usually leads to rather physically wrong fluid temperatures (i.e. large errors in comparison to the real physics) with the corresponding consequences for the accuracy of the overall simulation.
The CFD best practice is:
1) define meaningful, local and sensitive physical target quantities (e.g. a temperature profile or a distribution of a certain sensitive species of your mixture).
2) run a series of CFD simulations on a reasonable resolved mesh (not the coarsest one) with systematically refined (and reached !!) convergence criterion, i.e. RMS Res<10^-3, <10^-4, <10^-5. And so forth, if still there is not yet a convergent trend.
3) Make a comparison of your sensitive target quantities from this series of investigations. If the target quantities do NOT change anymore significantly (in the range of your wanted error level of the simulation), than you have found your convergence criterion to which you need to converge own all of your following simulations.
Any other explanation or strategy is not leading to realiable CFD results i my opinion. You can read this strategy in the ERCOFTAC Best Practice Guidelines for Industrial CFD and in the ASME Standard for CFD Simulations and Heat Transfer. And once it is an European and American standard approach, I think we should strive to fulfill it, doesn't we as responsible engineers?
Best regards,
Dr. Th. Frank.
Question