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.


Messages - william

Pages: 1 ... 8 9 [10] 11
136
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.

137
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).

138
Fluent / Re: how to perform swirl ratio calculation in Fluent
« on: February 04, 2012, 07:59:40 PM »
You can define a custom field function in Fluent. The definition and procedure of calculating swirl ratio is attached in the PDF file.



139
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 ∇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).


140
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.

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

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.

142
Hi,

In high-swirl rotating turbulent flows, the default settings for the Reynolds Stress Model and wall function can lead to erroneous predictions of the velocity profiles near rotating walls such that there is unphysical dissipation of the swirl in the outer region. The tangential velocity is flatter and decays more slowly resulting in an over-prediction of tangential velocity near the wall.

Steady-state solver
Green-Gauss cell-based solver
Pressure-based Coupled Solver
Relative velocity formulation

Turbulence Model = RSM
Options
Linear strain
Wall reflection option OFF to avoid impact on swirl
Near-wall Treatment = Non-equilibrium wall function

Discretization
Pressure = PRESTO
Momentum = MUSCL
Turbulence = Second-order upwind

Solver Controls
Courant number = 100
Under-relaxation Factors
Pressure, Momentum = 0.5
Turbulence = 0.1 (can be increased)

143
Fluent / Re: What is Swirl fraction in the hollow cone injection in Fluent?
« on: February 04, 2012, 06:33:24 PM »
In the hollow cone injection, the swirl fraction can be used to define the swirl velocity component, and then the spray cone angle. The swirl fraction is defined as

swirl_fraction = abs(tangential_velocity) / ( abs(tangential_velocity) + abs(axial_velocity) )

The coordinate system here is sitting on the rim of the injector with the velocity magnitude pointing in the direction of the axis that has been rotated by the cone angle and at the cone surface.

In this coordinate system, we will have u'=Vmag*(1-swirl_fraction), v'=0, w'=Vmag*swirl_fraction, where u' is the axial velocity component (injection direction), v' is the radial velocity component, w' is the tangential velocity component, and Vmag is the total velocity magnitude. If the swirl fraction is 0.5, then u'=0.5Vmag, v'=0, w'=0.5Vmag. However, the velocity vector has to be scaled to the unit vector to match the total velocity magnitude Vmag. Finally, we will have the velocity vector at the cone surface as

 u=(sqrt(2)/2)*Vmag, v=0, w=(sqrt(2)/2)*Vmag.

The swirl fraction is the relative fraction of the tangential velocity and the the other velocities at the cone surface. It is not the angle or the cosine of the angle. So, to get 45 degrees where the axial velocity and the tangential velocity would be equal, you would use a value of 0.5 for the swirl fraction. A value of zero would have no swirl, while a value of one would have no axial velocity component. It would look like a pinwheel. The swirling angle theta at the cone surface will be tan(theta) = swirl_fraction /(1-swirl_fraction).

144
Often, Chemical Engineers need to compute the RTD of their Continous stirred tank reactors (CSTRs). FLUENT's DPM model is challenging to use in these systems due to difficulty in getting statistically meaningful number of particles at the outlet. A second method is to introduce passive tracer material either with species or user-defined scalars. A method with user-defined scalars is outlined here.

Approach:

1. Solve for single-phase steady state flow field with inlets and outlets.
2. CHange to unsteady solver
3. Introduce a UDS with mass flux as convection term and default unsteady term. The UDS represents a passive tracer that is used to determine RTD experimentally.
4. Change UDS diffusivity to zero or reasonable values. For water-water system, this is quite low ~ 1e-10 m2/s.
5. For pulse input, patch a known amount of UDS near the inlet; for step input, make UDS value = 1 at inlet.
6. Turn on surface monitor of area-av. UDS value at the outlet. Plot, print/ write to file.
7. Turn off all equations except the UDS equation. Run for needed flow_time.

The UDS conc. at the outlet as a function of time can be used to extract the residence time distribution.

If you use step input of tracer(UDS value = 1 at inlet), the outlet UDS profile when normalized (Coutlet/Cinlet) is called F curve which is a cumulative residence time distribution.

If you introduce a pulse, the normalized response is called C Curve which is the RTD function.

145
Here is what you have to do:

Step 1: Read your steady-state case and data files into FLUENT.

Step 2: Set up one or more injections in the usual way using Define->Injections. If you want to mimic the pathline plot, make sure to use small particles (e.g. 1 micron). Display the particle tracks from the newly created injection(s). Please make sure that the injections defined above do result in some particles entering the domain. This is an important step as this allocates memory for particle tracks.

Step 3: Turn on the unsteady solver in Define->Models->Solver (use First Order - this is actually arbitrary).

Step 4: Enable Unsteady Particle Tracking in Define->Models->Discrete Phase Model (DPM) (use default settings).

Step 5: To automatically plot the DPM particles and export the graphics files for animations, use Solve->Execute Command as follows:

A. Create a macro to display the DPM particle positions for all injections using Display->Particle Tracks.

Option-1:- Use GUI generated Macro:-

This macro can be created using the Define Macro button. This function records the steps performed by the user in a function called macro. This macro will be executed at the frequency specified in the Solve Execute commands panel. The procedure to create a GUI based macro is given below:-

1. Increment No. of Execute commands by 1. Hit the Define Macro button. A panel will open up asking for the macro name. The default macro name will be "macro-1", either use the default name or customize it if you wish to.
2. Now you need to visit Display-->Particle Tracks panel. Select the coloring attributes for particle tracks (which can be velocity, particle ID or temperature) . Select the injection source and hit display.
3. The above step will display the particle tracks along with the other attributes(e.g. grid display etc.)
4. Visit Solve--> Execute Commands panel again and hit End Macro. Now FLUENT console window will show a message like:-
Macro macro-1 defined.
5. Now enter the macro name in the field "Command" (from Step 5 above) and set the frequency of execution as 2 time steps.

Option-2:- Use of TUI (text user Interface) command.

This option uses a TUI command to display the particle tracks.

Enter the following in the field for Command (from Step 5 above):

/display particle-tracks particle-tracks velocity-magnitude "injection-0" , , ,

In the above command we are coloring the particle tracks with velocity magnitude. Similarly one can change the coloring method (e.g. pressure, temperature etc).

You can either use Option-1 or Option-2 for displaying particle tracks.

B. Create a second macro to save a tif file to disk (using filename such as particle%t.tif, where %t will be the current time step). The command can be "/disp hc particle-tracks%t.tif" . One can change the hard copy attributes before executing this command. This can be done either through the GUI panel or through TUI commands. Its easy to set the attributes through GUI panel for Hardcopy. Go to File -->Hardcopy, set hardcopy format to tiff, coloring to color. Set preferred orientation and Foreground Background options and hit Apply. The attributes set in this panel will be used while saving the hardcopies.

C. Set the "When" input to "Time Step" and "Every" input as desired (e.g. 2 = run the macros every two time steps).

Step 6: Access Solve->Controls->Solution and deselect (disable) ALL equations (e.g. flow, turbulence, etc.). This will allow you to update the DPM model without changing your steady-state flow field solution.

Step 7: In the Solve->Iterate panel, choose a time step which is suitable for updating the particles. A good choice is to use dt = dx / Vc, where dx is the minimum cell size in the domain and Vc is a characteristic velocity. Also, set the number of sub iterations to 0.

Step 8: Run the model for as many time steps as desired (e.g. the number of time steps it takes for particles to traverse the entire domain). As the calculation proceeds, the Command macros will be executed, thereby saving graphics images of the particle positions to tif files. When the calculation is complete, you can use xanimate, gif construction set, or similar software to animate the images.

Some notes on the foregoing method...

* For plotting the particles, use "Style" of Point, with a point size (under "Attributes") of about 0.2. Also, showing an outline or feature lines of of the geometry is recommended, in order to provide a point of reference for the particles.
* Note that the unsteady DPM model is updated every time step when you run the model using Solve->Iterate. So when you access Display->Particle Tracks, you will display the current positions of the particles at a given time.
* There are "Start Time" and "Stop Time" parameters for each injection that you can specify in Define->Injections. These control when particles are released and removed from the domain. This can be useful for creating interesting displays (waves of particles initiated at different times, for example).
* In general for injections defined above, the stop time is set to same as "time step" in the flow iteration panel. This will ensure that the particles are injected only once in the domain.
* If one wants to perform the particle animation once again then the following needs to be done.

(1) Clear the particles which are in the domain through Define-->Models-->Discrete Phase panel. Hit the button "Clear particles"

(2) Reset the Flow time and time step counter using the following scheme commands. These commands (including their brackets) must be entered in the FLUENT console window.

(rpsetvar 'flow-time 0)

(rpsetvar 'time-step 0)

* Before proceeding for final animation generation, just perform two time step iterations and see the tiff file saved in the working directory. Change the hardcopy attributes as needed and restart the animation process by reseting the flow time and time step as mentioned above.

146
Hi,

Attached is a udf to calculate particles mean diameter (including D10, D20, D30 and D32) for each cell. After this udf is hooked up, you can draw the contour of any of the above mean diameters on the graphics window just like any flow variable.

To use this udf, you need to follow the following procedures:

(1) copy this udf "spray_sample.c" to your working directory where Fluent case/data files of a converged spay simulation are saved.

(2) compile that udf and create a udf library: launch Fluent and read in your case/data file; go to the Define/User-Defined/Functions/Compiled panel, add "spray-sample.c" to the source list, and hit "Build" to generate a udf library. After the library is built, click "Load" button to load in the udf.

(3) Hook up the udf:
a) Go to the Define/User-Defined/Memory panel and set 10 UDMs.
b) Go to the Define/User-Defined/Function Hooks/Adjust and hook up "adjust_spray"
c) Go to the Define/Discrete Phase Model panel to hook up "body_force_spray" to Body Force under User-Defined Functions, and also set Number of Scalars to be "1" in that panel.

(4) Run more iteration. The more iterations you run, more particles will be used to get those statistics.

(5) Draw contour of those mean diameters.

The above procedures give you particles mean diameters at each cell. If you want to know particles mean diameters across a particle cut plane,
Let¿s say D32, you can use the following procedures:

(1) Go to the Report/Surface Integrals to calculate Sum_(n_k*d_k**3): choose "Integral" under Report Type and "User Defined Memory" and
"udf-3" user Field variable, and pick up a cut-plane in the Surface list. Click "Compute" will give you Sum_(n_k*d_k**3).

(2) Calculate Sum_(n_k*d_k**2) in the same panel: choose "User Defined Memory" and "udf-2" user Field variable and click "Compute" to obtain
Sum_(n_k*d_k**2).

(3) D32=Sum_(n_k*d_k**3)/Sum_(n_k*d_k**2).

147
Fluent / Re: How to compute fluid residence time using UDF?
« on: February 04, 2012, 04:49:33 PM »
Fluent can compute fluid residence time via UDF using user-defined scalars. Source code for UDF is below.

Here are the steps:

1. Compile udf
2. Read case.... set # UDS > 0
3. At inlet, set UDS (value) = 0
4. Set diffusivity of UDS to a small value
5. Set source term of UDS to "rt_source" in the appropriat fluid zones
6. Iterate.
Values of UDS represent the length of time fluid has been in the domain since it entered the inlet (in seconds).

Regarding #4, for turbulent flows with recirculating zones, the use of a turbulent diffusivity is required for the correct calculation of the fluid residence time. Validations of this method using the turbulent diffusivity performed by ANSYS Fluent users have been published in academic journals.

Two such examples are:

Liu, M. and Tilton, J.N., 2010, "Spatial Distributions of Mean Age and Higher Moments in Steady Continuous Flows", AIChE Journal, Vol. 56, No. 10, pp. 2561-2572

Baleo, J-N. and Le Cloirec, P., 2000, "Validating a Prediction Method of Mean Residence Time Spatial Distributions", AIChE Journal, Vol. 46, No. 4, pp. 676-683

The text of the UDF can be found below:


/*========================*/
#include "udf.h"
/*
* UDF to compute fluid residence time
*
* This UDF requires at least 1 UDS to be defined
* At inlet, define UDS (value) = 0
* UDS will have units of time and represent approximate residence time
* of fluid in domain
*
* Diffusivity of scalar should be small to reduce diffusion i.e. 1E-5
* However, for turbulent flow with recirculating regions, it is more appropriate
* to hook the function rtd_diff to the UDS diffusivity in the
* materials panel
*/


DEFINE_SOURCE(rt_source,c,t,dS,eqn)
{
real source = C_R(c,t);
dS[eqn] = 0.0;
return source;
}

/*
* in the function below, the turbulent schmidt number has been
* set to 1.0 in accordance with the references mentioned above
* and the fluid molecular diffusivity has been set to 1.0e-5 m2/s
*
* these values can be changed on an as-needed basis, for instance in
* Airpak mean age of air calculations, a value of 2.88e-5 is used
* for the molecular diffusivity and a value of 0.7 is used for the
* turbulent Schmidt number
*/
DEFINE_DIFFUSIVITY(rtd_diff, c, t, i)
{
return C_R(c,t)*1.0e-05+C_MU_EFF(c,t)/1.0;
}

148
The message you are seeing is more a warning than an error. It stipulates that the ratio of turbulent viscosity over the laminar viscosity is large than 1e5.

While this is not an error per-say, it is usually unphysical to have such a high ratio (note that this ratio limit is defined in Solve-> Controls -> Limits).

This ratio becomes very high in region of high turbulence, where the grid is (in most cases) too coarse.

In many case, this message occurs at the beginning of a simulation and will disappear as the simulation converges.

If it doesn't then the first step would be to refine the grid in the regions where this limit is reached (this ratio can be plotted using Display -> Contours).

You can either re-create (and refine) the grid in its entirety or you can adapt the grid "on the fly" using a grid adaptation based on the value of this ratio.

149
This error message is an indication that the pressure correction equation is diverging. The most likely cause is that the under-relaxation factor (URF) for that equation is too large. Reduce the URF by 10% and repeat the calculation.

Try turning on AMG verbosity from the Multigrid Controls panel. Try a setting of verbosity=1. This will display AMG residuals for each equation during the iteration. Setting it to larger than that will report vast quantities of information. During the iteration, you will see the residuals of the multigrid sub-iterations. The default number of sub-iterations is 30. It normally takes under 10 sub-iterations for equations to converge to the default tolerance. However, if a particular equation does not converge, it will cycle-out, requiring all 30 iterations, before giving up. This will consume a lot of CPU time and is an indication that the solution is nearly divergent. If this happens, try reducing the URF for that equation, also by 10%. If the sub-iterations diverge, you will get the error message.

Another cause, albeit more fundamental, is a problem with the mesh quality. Mathematically, skewed cells induce source terms, which cause the equations to become unstable. You may not be able to resolve this problem without remeshing the domain. As a general rule, please make sure your mesh equivolume skew is less than 0.93-0.95. Especially important is that you should have low skew in regions where gradients are large. It is in these regions that errors multiply.

150
One reason could be that the geometry is not correct. Do a Mesh->Check to make sure you don't get

Checking for nodes that lie below the x-axis.
WARNING: Invalid axisymmetric mesh: 6 nodes lie below the x-axis.

and
WARNING: Mesh check failed.


For axisymmetric, the axial direction should be x and radial is positive y. Even if the y starts with -1e-32, it will fail.

To fix this:
Use Mesh->Translate and move the geometry so ymin is +ve.


Pages: 1 ... 8 9 [10] 11