Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - william

Pages: [1] 2
Fluent / Partially premixed combustion
« on: November 13, 2016, 02:55:36 PM »
If I run a partially premixed combustion solution and want to post-process NOx, I have the option to use a Mixture fraction or Temperature NOx PDF. Which is better and why?

The Mixture Fraction PDF is better.

1. It uses the same variance as was solved during the combustion calculation, which is superior to the approximate variance transport equation used for the NOX Temperature PDF

2. Both the number and distribution of the variance points in the NOx PDF, and the variance itself, align exactly with what is used in the combustion calculations, so turbulence interaction treatment is consistent across the calculations.

How to restart a run, allowing the solver to read the values from a previous results file, but giving own values for certain variables on domains?

The first simulation has been carried out, then simulation1.res is restarted using all variables, except some variables are overwritten with new values.

A simulation with two domains D1 and D2. The first simulation has been carried out, then simulation1.res is restarted with the initial values for D1 from simulation1.res and the initial values for D2 are specified manually.

In these situations Initialization with "Automatic" or "Automatic with Value" in CFX Pre will not work, as it will
read the variables from the results file.

In order to achieve this:
1. Create a def file with "Automatic with Value" initialization (for Example2, do not use global initialization
in CFX-Pre, but initialization per domain) and give desired value of variables which you would want solver
to use.
2. In Solver Manager, go to Tools -> Edit CFX-Solver File Edit Definition file and switch the initialization of
the desired variable to be "Value" instead of "Automatic with Value". See Figure 1. This value will be used
for the restart instead results from previous run even if a result file exists.
The same can be done for Example2, letting D1 initialization as "Automatic", and switching D2 initialization
to "Value" entering the desired value.

Fluent / How to create a Wall Boundary between Solid Zones in FLUENT?
« on: November 13, 2016, 02:44:47 PM »
Walls between Fluid - Solid zones are created automatically when imported into FLUENT even if not set in the geometry software, but interfaces between two solids are treated as interior zones by default.
The boundary between two solid zones is treated as interior surface by default. In the boundary conditions panel, boundary type can be changed from interior type to wall.

When using a mass-flow-inlet boundary condition, if more than one region is contained within the same
boundary condition zone, the value of the Mass Flow Rate that should be defined is the sum of the individual
mass flow rates, as showed on images attached.
Using this strategy, the resulted inlet velocity will be proportional to face areas.
This can be useful if you have several inlets, once you need to set only one named selection for all inlet
regions and one boundary condition definition.

Fluent / How to extrude a face zone in Fluent
« on: November 13, 2016, 02:31:37 PM »
The ability to extrude a boundary face zone allows you to extend the solution domain without having to exit Fluent. A typical application of the extrusion capability is to extend the solution domain when recirculating flow is impinging on a flow outlet. The current extrusion capability creates prismatic or hexahedral layers based on the shape of the face and normal vectors computed by averaging the face normals to the face zones node.
You can define the extrusion process by specifying a list of displacements (in SI units) or by specifying a total distance (in SI units) and parametric coordinates.


Note: This text command is not available in the parallel version of ANSYS Fluent.

Suppose you have a multiphase VOF problem in ANSYS Fluent and you wish to calculate the gradient of the volume of fluid variable (VOF). One application would be to determine the local interfacial area of a cell, which is given by the product of the magnitude of the cell VOF gradient and the cell volume.

A User-Defined Function (UDF) can be written (see below) to calculate gradient of a flow variable using User Defined Scalars (UDS) and User Defined Memory locations (UDM). For any UDS, ANSYS Fluent can calculate the gradient using an available macro. Hence, passing the variable to a UDS permits the cell-centered gradient of any flow variable to be calculated. This vector result can then be stored in UDM arrays. The steps for doing this are as follows:
1. Read in the converged case and data
2. Compile the UDF listed below in the Interpreted mode (Define->User Defined->Functions->Intepreted). You may also Compile the UDF for your platform if desired (Define->User Defined->Functions->Compiled).
3. Hook up the DEFINE_ADJUST function (Define->User Defined->Function Hooks->Adjust Function)
4. Define UDM (Define->User Defined->Memory 1)
5. Define UDS (Define->User Defined->Scalars 1)
6. Turn off all equations (Solve->Controls->Solution)
7. Do one solver iteration
8. Execute the UDF store_gradient (Define->User Defined->Execute On Demand)

/* VOF gradient UDF */
# include ʺudf.hʺ
# define domain_ID 2
DEFINE_ADJUST(adjust_gradient, domain)
Thread *t;
cell_t c;
face_t f;
domain = Get_Domain(domain_ID);
/* Fill UDS with the variable. */
thread_loop_c (t,domain)
{ begin_c_loop (c,t)
{ C_UDSI(c,t,0) = C_VOF(c,t); }
end_c_loop (c,t) }
thread_loop_f (t,domain)
begin_f_loop (f,t)
{F_UDSI(f,t,0) = F_VOF(f,t); }
end_f_loop (f,t) }
Domain *domain;
cell_t c;
Thread *t;
domain=Get_Domain(1); /* Fill the UDM with magnitude of gradient. */
thread_loop_c (t,domain)
begin_c_loop (c,t)
{C_UDMI(c,t,0) = NV_MAG(C_UDSI_G(c,t,0)); }
end_c_loop (c,t)

This solution contains a suggested procedure to converge highly compressible flow cases with the segregated solver.
-use incompressible (consant density)
-use default limits (Solver-> Controls->Limits)
-use default discretization and underrelaxations (Solve->Controls->Solution)
-use default Multigrid Solver settings (Solve ->Controls->Multigrid)
-initialize at average pressure
-iterate to converge (may change URF)

-change to ideal-gas law
-Report->Volume Integrals
Take volume-avage of static pressure
Patch pressure ONLY to the average value.
It should converge nicely.
-you may continue with 2nd-order flow

Fluent / How the heat transfer coefficient is computed in Fluent?
« on: April 25, 2012, 10:52:21 AM »
Just wanted to share some information on how the heat transfer coefficient is computed in Fluent:

The heat transfer coefficient is a characteristic of the flow. It is used to measure the ability of a flow to convect energy from walls. HTC=qwall/(Twall-Tref)

For forced convection flows, HTC is traditionally conceived to be a function of velocity (flow rate), fluid properties, and geometry. i.e. NU =HTC/KL = NU(Re,Pr); it is not thought in terms of wall boundary conditions. This is true only if Tref is a bulk (or "mixing cup", or mass-averaged) fluid temperature. For constant properties, by this definition, HTC becomes independent of thermal field.

There are at least 3 methods in calculating HTC in Fluent. The first two uses heat flux to get HTC, which requires a converged thermal field. In these two methods, HTC is determined by measuring the affect of it in the thermal field - by measuring heat flux. The 3rd method does not require to run the thermal field.

1. HTC=qwall/(Twall-Tref)

Tref is defined by the user in the Report->Reference Values. This HTC is a Fluent variable; it can directly be selected under 'Wall Fluxes'. This cannot be used if the bulk temperature changes along the flow direction, which gives it a limited usage. For example, it can't be used for flow inside a heated duct or a pipe, because the bulk temperature changes along the pipe. In these cases, this HTC becomes a fictitious value; it may be good only for that reference temperature. If it is going to be applied as boundary condition for another simulation or FEA analysis, it may only be used with that reference temperature - a fixed thermal boundary condition.

But it can be used for flow over a flat-plate, where the reference temperature far away from the plate remains unchanged in the flow direction. (For flat
plate, the bulk temperature turns out to be temperature at infinity.)

2. HTC = qwall/(Twall-Tcell)
In this definition, Tcell is the adjacent cell temperature. This definition is
much better than a fixed reference temperature for most complicated geometries.
In most cases, if wall functions are used and Y+ is obeyed, the adjacent cell
temperature becomes close to the bulk temperature. (Note that when using
standard wall functions, the Y+ at adjacent cell, ideally, should be between 30
and 60, mostly depending on the application.)

This definition cannot be applied for two-layer model where the first node is
too close to the wall. In this case the adjacent cell temperature will be much
higher than the should-be-used bulk temperature. This will over-predict HTC.

In practice, one may apply a constant wall temperature - value that is close
to actual value, and a fluid inlet temperature. Converge the thermal and the
flow field and then extract this HTC.

Two ways to get this HTC in Fluent:

This HTC can be exported into RADTHERM by typing in the text command:

Enter the filename.
Enter desired output surfaces' names, one at a time.
Hit Enter to exit out.

*Note* For double sided walls, you only need to select one of a
wall-shadow pair. The heat transfer info will be written
for both sides of it.

The output file is in Patran format and contains Packet 16, 17, and 18
16: V_x, V_y, V_z on both sides of the wall.
17: Heat Transfer Coefficients based on T_cell.
18: T_cell

HTC = ('Total Surface Heat Flux' - 'Radiation Heat Flux')/('Wall Temperature
(outer surface)' - 'Static Temperature'). You can perform contour plot of this
CFF without the node values. Without the node value 'Static Temperature' will
grab the adjacent cell temperature.

Note that in order to use q"/(Twall - Tcell), there has to be sufficient flux through the wall.

3. Another method to obtain HTC is to get it directly from wall functions. Note that this method can be used even if there is no flux through the wall!

For segregated solver, incompressible flow, and Ystar > Ystar_T:
Tstar=(Twall-Tcell)*Density * cp * Cmu^.25 * kcell^.5/qwall = Prt * [1/k *
ln (E * ystar) + P]

HTC = qwall/(Twall-Tcell) = Density * cp * Cmu^.25 * kP^.5 / {Prt * [1/k *
ln (E * ystar) + P]}

For segregated solver, incompressible flow, and Ystar>Ystar_T:
Tstar=(Twall-Tcell)*Density * cp * Cmu^.25 * kcell^.5/qwall = Pr * ystar

HTC = Density * cp * Cmu^.25 * kP^.5 / (Pr * ystar)

where P = (pi/4)/sin(pi/4) * (A/k)^.5 * (Pr/Prt - 1) * (Prt/Pr) ^.25

How to get this:

In Fluent6.1.x:
File -> Export
-select RADTHERM under 'File Type'
-select the walls under 'Surfaces'
-select 'Wall Function' under 'Heat Transfer Coef.'
-click on Write

You can also write a UDF to do this.

For a good quality mesh, skweness, aspect ratio, and the size change value should be under limit. Aspect ratio and the skewness represent the quality of a single cell, where as the size change represents the ratio of the size of a cell to its neighboring cell.

By definition,
Size change > 0 .
Aspect Ratio >1

For good quality mesh, the skewness must be less than 0.85 (<0.9 is average, >0.95 is poor). There is no limit for the aspect ratio and the size range. However, it is better to limit these two <10. Depending on the problem, region of interest, accuracy of the solution, etc, the limit varies.
Skewness is defined as the difference between the shape of the cell and the shape of an equilateral cell of equivalent volume.

The Size Change specification represents the maximum ratio of the area (for 2-D elements) or volume (for 3-D elements) of an element rela¬tive to its neighboring elements. To calculate the Size Change value for any ele¬ment i, GAMBIT first computes the individual ratios of its area or volume relative to each of its neighboring elements.

By definition, size change > 0 . Size change value 1 represents an element that is surrounded by elements the areas or volumes of which are exactly equal to its own.

The "aspect ratio" is a measure of the stretching of a cell, and is defined as the ratio of the maximum distance between the cell centroid and face centroids to the minimum distance between the nodes of the cell

Fluent / Guidelines for selecting a radiation model for beginners in Fluent
« on: February 04, 2012, 08:27:06 PM »
Just a quick list of radiation models available in Fluent and which one to use:
S2S for radiative exchange between surfaces. If the medium participates in the radiation exchange, DO and DTRM can be used for all range of optical thicknesses. P1 is preferred for optical thickness >1 and Roselland for optical thickness > 3.

S2S does not support symmetry boundaries. DTRM does not account for scattering. For particulate effects DO or P1 should be used. Only DO supports: semi-transparent walls, specular walls, non-gray radiation. Also DO is preferred if large localized heat sources are present.

Fluent / Velocity formulation- absolute vs. relative
« on: February 04, 2012, 08:21:11 PM »
Two formulations exist for a rotating reference frame. In the Multiple Reference Frame model, the absolute velocity formulation is preferred in applications where the flow in most of the domain is not rotating (e.g., a fan in a large room). The relative velocity formulation is appropriate when most of the fluid in the domain is rotating (e.g., a large impeller in a mixing tank).

Fluent / General guidelines on selecting a turbulence model
« on: February 04, 2012, 07:36:18 PM »
Just want to share very general guidelines (lazy man's guide  ;) ) to selecting a turbulence model:

Spalart- Allmaras: Economical for large meshes. Performs poorly for 3D flows, free shear flows, flows with strong separation. Suitable for mildly complex (quasi-2D) external/internal flows and b.l. flows under pressure gradient (e.g. airfoils, wings, airplane fuselage, missiles, ship hulls).

Standard k-e: Robust. Widely used despite the known limitations of the model. Performs poorly for complex flows involving severe &#8711;p, separation, strong stream line curvature. Suitable for initial iterations, initial screening of alternative designs, and parametric studies.

RNG k-e: Suitable for complex shear flows involving rapid strain, moderate swirl, vortices, and locally transitional flows (e.g., b.l. separation, massive separation and vortex-shedding behind bluff bodies, stall in wide-angle diffusers, room ventilation)

Realizable k-e: Offers largely the same benefits and has similar applications as RNG. Possibly more accurate and easier to converge than RNG.

Standard k-e: Superior performance for wall-bounded b.l., free shear, and low Re flows. Suitable for complex boundary layer flows under adverse pressure gradient and separation (external aerodynamics and turbomachinery). Can be used for transitional flows (though tends to predict early transition). Separation is typically predicted to be excessive and early.

SST k-e: Similar benefits as SKO. Dependency on wall distance makes this less suitable for free shear flows.

RSM: Physically the soundest RANS model. Avoids isotropic eddy viscosity assumption. More CPU time and memory required. Tougher to converge due to close coupling of equations. Suitable for complex 3D flows with strong streamline curvature, strong swirl/rotation (e.g. curved duct, rotating flow passages, swirl combustors with very large inlet swirl, cyclones).

Cavitation in rotating equipment (e.g. pumps) is an important industrial problem. Fluent has a cavitation modes that can be used with rotating reference frames to model cavitation in pumps. However, converging these problems for cases with significant cavitation can be challenging. This solution outlines a procedure that has been found to be successful in a wide range of pump calculations. Additional information can found in the following Technical Note, available from Fluent Inc.:

Kelecy, F.J. (2003)
"Numerical Prediction of Cavitation in a Centrifugal Pump"
TN 211, Fluent Inc.
Consider a pump with a velocity or pressure inlet and a pressure outlet. For simplicity we'll assume that the pump is being modeled as a single blade passage with periodic boundaries using a single moving reference frame (SRF). The working fluid is assumed to be incompressible, and the cavitation model is to be applied to this system. It should be noted that the mixture model version of the cavitation model is used with the Slip Velocity option disabled (that is, we assume the vapor and liquid move with nearly the same velocities though the blade passage). This option could be enabled if desired.

The key to converging the problem is to initialize the solution with a *** single phase solution *** wherein the minimum pressure in the system is above the prescirbed vapor pressure (set in the Define->Models->Multiphase panel). One of the best ways to control this is through the exit pressure - simply set the exit pressure to a high enough value such that the minimum pressure is safely above the vapor pressure. Since the absolute pressure value is not important for an incompressible fluid (only pressure differences are), setting the pressure level in this manner will not affect the single phase solution.

Once the single phase solution has been established, you can then enable the cavitation model. However, it is useful to begin the calculation by *** not changing the exit pressure *** and simply running the model with cavitation turned on. You should not observe any vapor being formed, or if it does (due to fluctuations in pressure), it should rapidly disappear.

When the foregoing solution has converged, you may then reduce the exit pressure to the desired value. If the final exit pressure is signifiantly different than your initial exit pressure, you should gradually reduce the exit pressure to prevent convergence problems. For example, if your initial back pressure were 500 kPa and your target value was 100 kPa, you can reduce the exit pressure to 400 kPa, converge the solution, reduce it to 300 kPa, converge the solution, and so on until the desired level is reached.

If you encounter convergence difficulties, here are some things you can try to enhance stability:

(1) Reduce the under-relaxation factor for pressure correction equation with the command :

(rpsetvar 'pressure-correction/relax 0.6) or even smaller. The default value is 0.7.

(2) Reduce the relaxation factor for momentum equations. You may try to use the values as small as 0.02 in some cases. The cavitating flow sometimes is similar to swirling flows, and thus it can take a while for the vapor bubbles to stabilize.

(3) Reduce the underrelaxation factors for density & vaporization mass.

(4) Modifying the Multigrid settings in Solve->Controls->Multigrid can sometimes help. I have found that setting the Pressure equation termination criterion to 0.001 (rather than 0.1) and setting the post-sweeps to 3 can make the solution of the pressure equation more robust.

Fluent / Pressure-based solver vs. Density-based solver
« on: February 04, 2012, 07:11:45 PM »

I just wanted to share the difference between the pressure based solver and density based solver. And which solver is suitable for any application.

Pressure-based algorithm solves the pressure equation to conserve mass and can be used in any flow simulation except with the following features: real gas models, non-reflecting boundary conditions, and wet steam multiphase model.

Density-based algorithm solves the original continuity equation along with momentum, energy and species transport as a coupled set of equations. This solver is not available for cavitation model, VOF model, multiphase mixture model, Eulerian multiphase model, non-premixed combustion model, premixed combustion model, partially premixed combustion model, composition PDF transport model, Soot model, Rosseland radiation model, melting/solidification model, shell conduction model, floating operating pressure, fixed variable option, physical velocity formulation for porous media, relative velocity formulation, and specified mass flow rate for streamwise periodic flow.

Fluent / How do I calculate concentration of water in a cell?
« on: February 02, 2012, 04:14:59 PM »
I have mass transfer from the spheres (lagrangian tracking) to the air (continuous phase). The mass transfer depends on the difference in concentration between particle surface vapours and water vapours concentration in the gas phase. For this I suppose I will need the water vapour concentration of the cell in which the particle is located.

If that is the case, then how do I calculate the concentration water in the cell?


Pages: [1] 2