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] 2 3 ... 11
1
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.

2
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?

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

Example2;
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.

3
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.
 :D

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


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

mesh/modify-zones/extrude-face-zone-para
mesh/modify-zones/extrude-face-zone-delta

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

6
CFX / Re: Combustor efficiency
« on: November 12, 2016, 06:20:29 PM »
The ccl below uses the CEL expression CombEff to adjust the heating values:

LIBRARY:
MATERIAL: Methane Air WD1
Option = Variable Composition Mixture
Reactions List = Methane Air WD1
END # MATERIAL Methane Air WD1
MATERIAL : CH4 # Methane
Option = Pure Substance
PROPERTIES :
Option = Ideal Gas
Molar Mass = 16.04 [kg kmol^-1]
Dynamic Viscosity = 11.1E-06 [kg m^-1 s^-1]
Thermal Conductivity = 343E-04 [W m^-1 K^-1]
Thermal Expansivity = 3.35E-03 [K^-1]
Refractive Index = 1.
Reference Pressure = 1. [atm]
Reference Temperature = 25 [C]
Reference Specific Enthalpy = -74.87310 [kJ mol^-1] / 16.04 [kg kmol^-1]
Reference Specific Entropy = 186.2 [J mol^-1 K^-1] / 16.04 [kg kmol^-1]
SPECIFIC HEAT CAPACITY:
Option = NASA Format
Temperature Limit List = 300 [K], 5000 [K], 1000 [K]
NASA Coefficient List =
NASACoeff21, NASACoeff22, NASACoeff23,
NASACoeff24, NASACoeff25, NASACoeff26,
NASACoeff27,
NASACoeff11, NASACoeff12, NASACoeff13,
NASACoeff14, NASACoeff15, NASACoeff16,
NASACoeff17
END #SPECIFIC HEAT CAPACITY
#
# Boiling point (1 atm) = 111.66 [K]
# Critical Temperature = 190.58 [K]
# Critical Pressure = 4.604E+06 [Pa]
#
END #PROPERTIES
END #MATERIAL


CEL:
EXPRESSIONS:
#
# Combustion of methane: CH4 + 2O2 -> CO2 + 2H2O
#
Rgas = 8314.41 [J kmol^-1]
CombEff = 0.95
HoFCO2 = -393.5224 [kJ mol^-1]
HoFH2O = -241.8264 [kJ mol^-1]
HoFCH4 = -74.8731 [kJ mol^-1]
HeatofProducts = HoFCO2+2*HoFH2O
HeatofReaction = HeatofProducts-HoFCH4
#
# Modify heat of formation ofmethane to account for a
# combustion efficiency of less than 100% using Gordon
# & McBride (NASA) format for enthalpy polynomial
#
HoFCH4Mod = HeatofProducts-CombEff*HeatofReaction
#
NASACoeff11 = 0.07787415E+01
NASACoeff12 = 0.01747668E+00
NASACoeff13 = -0.02783409E-03
NASACoeff14 = 0.03049708E-06
NASACoeff15 = -0.01223931E-09
NASACoeff17 = 0.01372219E+03
Tref1 = 298.15
DHTref11 = NASACoeff11*Tref1 + NASACoeff12*Tref1^2/2 +
NASACoeff13*Tref1^3/3 + NASACoeff14*Tref1^4/4 + NASACoeff15*Tref1^5/5
Tref2 = 1000.0
DHTref12 = NASACoeff11*Tref2 + NASACoeff12*Tref2^2/2 +
NASACoeff13*Tref2^3/3 + NASACoeff14*Tref2^4/4 +
NASACoeff15*Tref2^5/5
NASACoeff16 = HoFCH4Mod/Rgas-DHTref11
# NASACoeff16 = -0.09825229E+05
#
# High temperature polynomial
#
NASACoeff21 = 0.01683479E+02
NASACoeff22 = 0.01023724E+00
NASACoeff23 = -0.03875129E-04
NASACoeff24 = 0.06785585E-08
NASACoeff25 = -0.04503423E-12
NASACoeff27 = 0.09623395E+02
DHTref22 = NASACoeff21*Tref2 + NASACoeff22*Tref2^2/2 +
NASACoeff23*Tref2^3/3 + NASACoeff24*Tref2^4/4 +
NASACoeff25*Tref2^5/5
# Ensure high T and low T polynomials match at Tref2
NASACoeff26 = DHTref12 + NASACoeff16 - DHTref22
# NASACoeff26 = -0.01008079E+06
#
END # EXPRESSIONS
END # CEL
END # LIBRARY


FLOW:

DOMAIN: Combustor
Location = Combustor
Coord Frame = Coord 0
Fluids List = Methane Air WD1
DOMAIN MODELS:
DOMAIN MOTION:
Option = Stationary
END # DOMAIN MOTION
BUOYANCY MODEL:
Option = Non Buoyant
END # BUOYANCY MODEL
REFERENCE PRESSURE:
Reference Pressure = 1.0133E5 [Pa]
END # REFERENCE PRESSURE
END # DOMAIN MODELS

FLUID MODELS:
TURBULENCE MODEL:
Option = k epsilon
END # TURBULENCE MODEL
TURBULENT WALL FUNCTIONS:
Option = Scalable
END # TURBULENT WALL FUNCTIONS
HEAT TRANSFER MODEL:
Option = Thermal Energy
END # HEAT TRANSFER MODEL
COMBUSTION MODEL:
Option = Eddy Dissipation
END # COMBUSTION MODEL
COMPONENT: CH4
Option = Transport Equation
END # COMPONENT CH4
COMPONENT: O2
Option = Transport EquationEND # COMPONENT O2
COMPONENT: CO2
Option = Transport Equation
END # COMPONENT CO2
COMPONENT: H2O
Option = Transport Equation
END # COMPONENT H2O
COMPONENT: N2
Option = Constraint
END # COMPONENT N2
THERMAL RADIATION MODEL:
Option = None
END # THERMAL RADIATION MODEL
END # FLUID MODELS

END # DOMAIN Combustor
END #FLOW

7
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)
{ if (THREAD_STORAGE(t,SV_UDS_I(0))!=NULL)
begin_f_loop (f,t)
{F_UDSI(f,t,0) = F_VOF(f,t); }
end_f_loop (f,t) }
}
DEFINE_ON_DEMAND(store_gradient)
{
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)
}
}

8
The UDF needs to be compiled. You can not interpret it.

10
Fluent / Re: gas escape from stirred tank
« on: October 10, 2012, 07:35:53 PM »
What is your inlet boundary condition?
Make sure that the pressure at the outlet face is smaller than upstream pressure.

You can set mass outflow as the outlet boundary condition if you don't have backflow at the outlet.

11
Fluent / Re: Solver for vortex tube simulation
« on: September 24, 2012, 11:58:04 AM »
The selection of the solver is based on whether the fluid is compressible or incompressible. Even the gases can be considered incompressible if the pressure gradient in the flow is not large enough to change the density significantly. But if you have a large pressure gradient or if the fluid has mach number greater than 0.3 then density based solver is preferred.

12
You can do three test cases, one in which cell size is smaller than particle size. Second one in which both are comparable. Third one in which cell size is greater than particle size.

Before doing these cases, make sure that the single phase result is independent of these mesh sizes.
Because if the results of single-phase-only-flow is also changing with these three grid sizes then you can not reach a conclusion whether it is because of the grid size/discrete phase size ratio or because of the continuous phase flow dependent on the mesh size.


13
Fluent / Re: How can I get particles mean diameters at each cell?
« on: August 29, 2012, 11:21:03 AM »
You can get an estimated solid volume fraction in a cell by diving discrete phase concentration with particle density (assuming that all particles have the same density).

This will be:

C_DPMS_CONCENTRATION(c,t)/P_RHO(p)

You may get a value greater than 1 in certain regions if your case involves dense discrete phase flow.

14
Fluent / Re: How can I get particles mean diameters at each cell?
« on: August 29, 2012, 09:00:03 AM »
You will have to compile the UDF you can not run it as interpreted because it uses variables.
You will need to sort out the issues with compiling.

15
Fluent / Re: How can I get particles mean diameters at each cell?
« on: August 28, 2012, 06:23:17 PM »
You will need to define additional UDMs for this purpose.

The particle velocities at cells can be stored using:

P_VEL(p)[0] ---> x component of particle velocity
P_VEL(p)[1] ---> y component of particle velocity
P_VEL(p)[2] ---> z component of particle velocity


Pages: [1] 2 3 ... 11