SlideShare une entreprise Scribd logo
1  sur  19
11-1
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Chapter 11
CFX Expression Language
(CEL)
Introduction to CFX
CFX Expression Language
11-2
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• CEL - CFX Expression Language
– Allows the user to create equations (can be functions of
solution/system variables) that can be used in CFX-Pre and CFD-Post
• Example:
CEL
CFX Expression Language
11-3
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• The syntax rules are the same as those for conventional arithmetic.
Operators are written as:
+ (addition) - (subtraction) * (multiplication)
/ (division) ^ (exponentiation)
• Variables and expressions are case sensitive (example: t vs. T)
• Expressions must be dimensionally consistent for addition and subtraction
operations (example: 1.0 [mm] + 0.45 [yds] is OK)
– You cannot add values with inconsistent dimensions
• Fractional and decimal powers are allowed (example: a^(1/2) + 1.0^0.5)
• Units of expressions are not declared – they are the result of units in the
expression (example: a [kg m^-3] * b [m s^-1] has units of [kg m^-2 s^-1]
• Some constants are also available in CEL for use in expressions:
– e Constant: 2.7182818
– g Acceleration due to gravity: 9.806 [m s^-2]
– pi Constant: 3.1415927
– R Universal Gas Constant: 8314.5 [m^2 s^-2 K^-1]
CEL Rules
CFX Expression Language
11-4
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• Numerical functions and operators are also available in CEL
– Right-click when creating expressions for a complete list
– Custom functions with User Fortran can also be created
Function Operand’s Dimensions [x] Operand’s Values Result’s Dimensions
sin(x) Angle Any Dimensionless
cos(x) Angle Any Dimensionless
tan(x) *** Angle Any Dimensionless
asin(x) Dimensionless -1 ≤ x ≤ 1 Angle
acos(x) Dimensionless -1 ≤ x ≤ 1 Angle
atan(x) Dimensionless Any Angle
exp(x) Dimensionless Any Dimensionless
loge(x) Dimensionless 0 < x Dimensionless
log10(x) Dimensionless 0 < x Dimensionless
abs(x) Any Any [x]
sqrt(x) Any 0 ≤ x [x]^0.5
if(test, res1, res2)* Any Any Any (res1 and res2 must have the same dimensions)
min(x,y) **** Any Any [x]
max(x,y) **** Any Any [x]
step(x) * Dimensionless Any Dimensionless
*if functions contain a test, and two result outcomes. The first outcome, res1 will be returned if test evaluates to true. If test evaluates to false, res2 is
returned. Consider the following example, where we wish to set volume fraction to 1 when X is greater than 1 [m], and 0 if X is less than 1 [m]:
if (x>1[m], 1, 0)
In this case, if the result is precisely equal to 1[m], the result is (res1+res2)/2
**step(x) is 0 for negative x, 1 for positive x and 0.5 for x=0.
*** note that tan(x) is undefined for nπ/2 where n=1, 3, 5 .. .
**** both x and y must have the same dimensions.
Built In Functions
CFX Expression Language
11-5
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
x Direction 1 in Reference Coordinate Frame
y Direction 2 in Reference Coordinate Frame
z Direction 3 in Reference Coordinate Frame
r Radial spatial location, r = (x^2+y^2)^0.5
theta Angle, arctan(y/x)
t Time
u Velocity in the x coordinate direction
v Velocity in the y coordinate direction
w Velocity in the z coordinate direction
p (absolute) Pressure
ke Turbulent kinetic energy
ed Turbulent eddy dissipation
T Temperature
sstrnr Shear strain rate
density Density
rNoDim Non-dimensional radius (rotating frame only)
viscosity Dynamic Viscosity
Cp Specific Heat Capacity at Constant Pressure
cond Thermal Conductivity
AV name Additional Variable name
mf Mass Fraction
• Solver variables are available for use in any expression
• Below is a partial list of the available system variables:
– When creating expressions, right-click to access a full list
Depending on your
physics, some
variables will not be
valid – e.g. you need
to solver heat transfer
to use T
Solver Variables
CFX Expression Language
11-6
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training ManualHow To Create Expressions
CFX Expression Language
11-7
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
To add more
expressions
(similar method in
CFD-Post)
How To Create Expressions
Right-click in the
Definition window
to access
Variables,
Constants,
Functions,
Locators and
existing
Expressions
CFX Expression Language
11-8
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
where γ is the shear strain rate
• Creating a variable viscosity
– Viscosity of a shear thickening fluid:
1−
= n
Kγµ
Solver Variable and Expression Name are both
accessed via the right mouse button
CEL in CFX-Pre: Example 1
CFX Expression Language
11-9
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• Alternatively, an expression can be entered directly into a field
CEL in CFX-Pre: Example 1
CFX Expression Language
11-10
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• Using an “if” Function
– Set inlet temperature to 300 K for the first 19 iterations then raise it to
320 K after 20 iterations
Solver variable
accessed with the right
mouse button
Note: On the 21st
iteration
inlet temp = 310 K
CEL in CFX-Pre: Example 2
CFX Expression Language
11-11
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• You can also define your own 1-D linear, or 3-D cloud of points
interpolation functions
Import
data
points or
add
manually
User Functions
CFX Expression Language
11-12
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• Example: Having the timestep change
with iteration number as shown here
Timestep size is in seconds
Continued on next
slide...
User Functions: Example
Iteration Number is
dimensionless
CFX Expression Language
11-13
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• Example: Having the timestep change
with iteration number as shown here
User Functions: Example
CFX Expression Language
11-14
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• Integrated quantities can be used in expressions to evaluate variables over
some location
– Examples:
– Calculate the area average of Cp on an isosurface: areaAve(Cp)@iso1
– Mass flow of particular fluid through a locator: oil.massFlow()@slice1
• Available in CFX-Pre and CFD-Post
– Usage is more strict in CFX-Pre
• E.g. the argument supplied to the function must be a variable, not an expression
• “@<locator>” syntax must always supply a named location used in the
physics definition
– A boundary condition name, a domain name, a monitor point name, etc.
• To reference general mesh regions use the syntax “@REGION:<name>”
• Phases/components can be referenced using:
[<phase name>.][<component name>.]<function>@<locator>
– E.g. Air.Nitrogen.massFlow()@outlet
Integrated Quantities
CFX Expression Language
11-15
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training ManualIntegrated Quantities
• Some functions allow an x, y or z operator:
– area_x()@boundary gives the area projected in the x-direction
– force_z()@wall gives the z component of the force on the wall
– See documentation for a full list
• These functions also allow an optional coordinate frame:
– force_z_MyCoord()@wall gives the z component of the force on the wall using the
coordinate frame “MyCoord”
• Each function requires either 0 or 1 arguments
– areaAve requires 1 argument: areaAve(Temperature)@Wall
– massFlow requires 0 arguments: massFlow()@Inlet
• Return value units depend on the argument units
– areaAve(Temperature)@Wall will return a value with units of
Temperature
CFX Expression Language
11-16
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
• Below is a partial list of functions
– See documentation for a complete list
– Right-clicking when creating an expression will show most functions
Function Name and Syntax
<required> [<optional>]
area( )@<Location>
Area of a boundary or
interface.
Any 2D region (e.g., boundary
or interface)
area_x( )@<Location>
area_y( )@<Location>
area_z( )@<Location>
The (signed) component of the
normal area vector in the local
x, y or z direction. Any 2D region (e.g., a
boundary or interface)
areaAve(<var>)@<Location>
Area-weighted average of <var>
on a boundary.
Any 2D region (e.g., a
boundary or interface)
areaInt(<var>)@<Location>
Area-weighted integral of <var>
on a boundary.
Any 2D region (e.g., a
boundary or interface)
ave(<var>)@<Location>
Arithmetic average of <var>
within a domain or subdomain.
Any 3D region (e.g., domain or
subdomain)
[<Fluid>.]force( )@<Location>
The magnitude of the force
vector on a boundary. Any 2D region (e.g., a wall)
Operation Valid <Location>
Integrated Quantities
CFX Expression Language
11-17
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
Function Name and Syntax
<required> [<optional>]
[<Fluid>.]force_x( )@<Location>
[<Fluid>.]force_y( )@<Location>
[<Fluid>.]force_z( )@<Location>
The (signed) component of the
force vector in the local x, y
or z direction. Any 2D region (e.g., a wall)
inside()@<Location>
Similar to the subdomain
variable, but allows a specific
2D or 3D location to be given.
Any 2D or 3D named sub-
region of the physical location
on which the expression is
evaluated.
mass()@<Location>
The total mass within a domain
or subdomain. This is fluid
dependent.
Any 3D region (e.g., domain or
subdomain)
massAve(<var>)@<Location>
Mass-weighted average of
<var> on a domain or
subdomain.
Any 3D region (e.g., domain or
subdomain)
massInt(<var>)@<Location>
The mass-weighted integration
of <var> within a domain or
subdomain
Any 3D region (e.g., domain or
subdomain)
[<Fluid>.]massFlow()@<Location> Mass flow through a boundary.
Any fluid surfaces (e.g., Inlets,
Outlets, Openings and fluid-
fluid interfaces)
[<Fluid>.]massFlowAve(<var>)
@<Location>
Mass flow weighted average of
<var> on a boundary.
Any fluid surfaces (e.g., Inlets,
Outlets, Openings and fluid-
fluid interfaces)
Operation Valid <Location>
Integrated Quantities
CFX Expression Language
11-18
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training Manual
Function Name and Syntax
<required> [<optional>]
[<Fluid>.]massFlowAveAbs(<var>)
@<Location>
Absolute mass flow weighted
average of <var> on a
boundary.
Any fluid surfaces (e.g., Inlets,
Outlets, Openings and fluid-
fluid interfaces)
[<Fluid>.]massFlowInt(<var>)
@<Location>
Mass flow weighted integration
of <var> on a boundary.
Any fluid surfaces (e.g., Inlets,
Outlets, Openings and fluid-
fluid interfaces)
maxVal(<var>)@<Location>
Maximum Value of <var>
within a domain or subdomain.
Any 3D region (e.g., domain or
subdomain)
minVal(<var>)@<Location>
Minimum Value of <var> within
a domain or subdomain.
Any 3D region (e.g., domain or
subdomain)
probe(<var>)@<Location>
Returns the value of the
specified variable on the
specified Point locator.
Any point object (e.g., a
Source Point or Cartesian
Monitor Point)
rmsAve(<var>)@<Location>
RMS average of <var> within a
domain.
Any 3D region (e.g., domain or
subdomain)
sum(<var>)@<Location>
Sum of <var> over all domain
or subdomain vertices.
Any 3D region (e.g., domain or
subdomain)
Operation Valid <Location>
Integrated Quantities
CFX Expression Language
11-19
ANSYS, Inc. Proprietary
© 2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002598
Training ManualUseful Functions
• The inside() function returns 1 when inside the specified location and
0 when outside
– Useful to limit the scope of a function to a subdomain or boundary
• The step() function return 1 when the argument is positive and 0
when the argument is negative
– Useful as an on-off switch
– if() function can also be used as a switch
• areaAve() and massFlowAve() are used to evaluate the average of a
quantity on a location
– areaAve() is an area-weighted average. It is usually used on wall
boundaries and when the quantity is not “carried with the flow”, e.g.
Pressure at an outlet, Temperature on a wall
– massFlowAve() is an average weighted by the local mass flow. It is
usually used to evaluate quantities that are “carried with the flow”, e.g.
Temperature at an outlet

Contenu connexe

Tendances

Customization of LES turbulence model in OpenFOAM
Customization of LES turbulence	 model in OpenFOAMCustomization of LES turbulence	 model in OpenFOAM
Customization of LES turbulence model in OpenFOAMmmer547
 
Basic Boundary Conditions in OpenFOAM v2.4
Basic Boundary Conditions in OpenFOAM v2.4Basic Boundary Conditions in OpenFOAM v2.4
Basic Boundary Conditions in OpenFOAM v2.4Fumiya Nozaki
 
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0ARPIT SINGHAL
 
Dynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAMDynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAMFumiya Nozaki
 
CFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMCFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMFumiya Nozaki
 
Fluent 13.0 lecture09-physics
Fluent 13.0 lecture09-physicsFluent 13.0 lecture09-physics
Fluent 13.0 lecture09-physicsRashed Kaiser
 
Chapter 10. VOF Free Surface Model
Chapter 10. VOF Free Surface ModelChapter 10. VOF Free Surface Model
Chapter 10. VOF Free Surface ModelRay Young
 
Cfx12 10 heat_transfer
Cfx12 10 heat_transferCfx12 10 heat_transfer
Cfx12 10 heat_transferMarcushuynh66
 
Simcenter Amesim/STAR-CCM+ co-simulation – Aircraft ECS with its cabin and pa...
Simcenter Amesim/STAR-CCM+ co-simulation – Aircraft ECS with its cabin and pa...Simcenter Amesim/STAR-CCM+ co-simulation – Aircraft ECS with its cabin and pa...
Simcenter Amesim/STAR-CCM+ co-simulation – Aircraft ECS with its cabin and pa...Siemens PLM Software
 
explicit dynamics
explicit dynamicsexplicit dynamics
explicit dynamicsvinaykumars
 
152222317-Explicit-Dynamics-Chapter-9-Material-Models AnSYS.pdf
152222317-Explicit-Dynamics-Chapter-9-Material-Models AnSYS.pdf152222317-Explicit-Dynamics-Chapter-9-Material-Models AnSYS.pdf
152222317-Explicit-Dynamics-Chapter-9-Material-Models AnSYS.pdfaman400979
 
buoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoambuoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoamMilad Sm
 
OpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on trainingOpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on trainingJibran Haider
 

Tendances (20)

Customization of LES turbulence model in OpenFOAM
Customization of LES turbulence	 model in OpenFOAMCustomization of LES turbulence	 model in OpenFOAM
Customization of LES turbulence model in OpenFOAM
 
Cfx12 07 physics2
Cfx12 07 physics2Cfx12 07 physics2
Cfx12 07 physics2
 
Basic Boundary Conditions in OpenFOAM v2.4
Basic Boundary Conditions in OpenFOAM v2.4Basic Boundary Conditions in OpenFOAM v2.4
Basic Boundary Conditions in OpenFOAM v2.4
 
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
 
Ansys 11 tutorial
Ansys 11 tutorialAnsys 11 tutorial
Ansys 11 tutorial
 
Basic openfoa mtutorialsguide
Basic openfoa mtutorialsguideBasic openfoa mtutorialsguide
Basic openfoa mtutorialsguide
 
Dynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAMDynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAM
 
CFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMCFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAM
 
Fluent 13.0 lecture09-physics
Fluent 13.0 lecture09-physicsFluent 13.0 lecture09-physics
Fluent 13.0 lecture09-physics
 
CFD - OpenFOAM
CFD - OpenFOAMCFD - OpenFOAM
CFD - OpenFOAM
 
Chapter 10. VOF Free Surface Model
Chapter 10. VOF Free Surface ModelChapter 10. VOF Free Surface Model
Chapter 10. VOF Free Surface Model
 
Cfx12 05 post
Cfx12 05 postCfx12 05 post
Cfx12 05 post
 
Cfx12 10 heat_transfer
Cfx12 10 heat_transferCfx12 10 heat_transfer
Cfx12 10 heat_transfer
 
Simcenter Amesim/STAR-CCM+ co-simulation – Aircraft ECS with its cabin and pa...
Simcenter Amesim/STAR-CCM+ co-simulation – Aircraft ECS with its cabin and pa...Simcenter Amesim/STAR-CCM+ co-simulation – Aircraft ECS with its cabin and pa...
Simcenter Amesim/STAR-CCM+ co-simulation – Aircraft ECS with its cabin and pa...
 
explicit dynamics
explicit dynamicsexplicit dynamics
explicit dynamics
 
windshield defrost
windshield defrostwindshield defrost
windshield defrost
 
Turbulence 2020 gt
Turbulence 2020 gtTurbulence 2020 gt
Turbulence 2020 gt
 
152222317-Explicit-Dynamics-Chapter-9-Material-Models AnSYS.pdf
152222317-Explicit-Dynamics-Chapter-9-Material-Models AnSYS.pdf152222317-Explicit-Dynamics-Chapter-9-Material-Models AnSYS.pdf
152222317-Explicit-Dynamics-Chapter-9-Material-Models AnSYS.pdf
 
buoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoambuoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoam
 
OpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on trainingOpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on training
 

En vedette

Cfx12 06 review_day1
Cfx12 06 review_day1Cfx12 06 review_day1
Cfx12 06 review_day1Marcushuynh66
 
Final Exam Ansys CFX - Stephen White
Final Exam Ansys CFX - Stephen WhiteFinal Exam Ansys CFX - Stephen White
Final Exam Ansys CFX - Stephen WhiteStephen White
 
Cfx12 00 toc_welcome
Cfx12 00 toc_welcomeCfx12 00 toc_welcome
Cfx12 00 toc_welcomeMarcushuynh66
 
Advanced Simulations of Hypertrophic Obstructive Cardiomyopathy in Human Hear...
Advanced Simulations of Hypertrophic Obstructive Cardiomyopathy in Human Hear...Advanced Simulations of Hypertrophic Obstructive Cardiomyopathy in Human Hear...
Advanced Simulations of Hypertrophic Obstructive Cardiomyopathy in Human Hear...Can Ozcan
 
Combustion modelling using_ansys_cfx
Combustion modelling using_ansys_cfxCombustion modelling using_ansys_cfx
Combustion modelling using_ansys_cfxmanojg1990
 
Simulations of Hypertrophic Obstructive Cardiomyopathy (HOCM) in a Human Hear...
Simulations of Hypertrophic Obstructive Cardiomyopathy (HOCM) in a Human Hear...Simulations of Hypertrophic Obstructive Cardiomyopathy (HOCM) in a Human Hear...
Simulations of Hypertrophic Obstructive Cardiomyopathy (HOCM) in a Human Hear...Can Ozcan
 
Cfx12 11 cel_printing
Cfx12 11 cel_printingCfx12 11 cel_printing
Cfx12 11 cel_printingMarcushuynh66
 
HLPW2-sasanapuri
HLPW2-sasanapuriHLPW2-sasanapuri
HLPW2-sasanapuriVijay Kumar
 
HPC Parallel Computing for CFD - Customer Examples (2 of 4)
HPC Parallel Computing for CFD - Customer Examples (2 of 4)HPC Parallel Computing for CFD - Customer Examples (2 of 4)
HPC Parallel Computing for CFD - Customer Examples (2 of 4)Ansys
 
Numerical simulation of blood flow in flexible arteries using Fluid-Structure...
Numerical simulation of blood flow in flexible arteries using Fluid-Structure...Numerical simulation of blood flow in flexible arteries using Fluid-Structure...
Numerical simulation of blood flow in flexible arteries using Fluid-Structure...Mostafa Ghadamyari
 
Finite Element Simulations with ANSYS Workbench 2012
Finite Element Simulations with ANSYS Workbench 2012Finite Element Simulations with ANSYS Workbench 2012
Finite Element Simulations with ANSYS Workbench 2012Prem Prakash Pandey
 
Mechanics of materials solution manual (3 rd ed , by beer, johnston, & dewolf)
Mechanics of materials solution manual (3 rd ed , by beer, johnston, & dewolf)Mechanics of materials solution manual (3 rd ed , by beer, johnston, & dewolf)
Mechanics of materials solution manual (3 rd ed , by beer, johnston, & dewolf)Pawnpac
 

En vedette (20)

Cfx12 06 review_day1
Cfx12 06 review_day1Cfx12 06 review_day1
Cfx12 06 review_day1
 
Final Exam Ansys CFX - Stephen White
Final Exam Ansys CFX - Stephen WhiteFinal Exam Ansys CFX - Stephen White
Final Exam Ansys CFX - Stephen White
 
Cfx12 00 toc_welcome
Cfx12 00 toc_welcomeCfx12 00 toc_welcome
Cfx12 00 toc_welcome
 
Advanced Simulations of Hypertrophic Obstructive Cardiomyopathy in Human Hear...
Advanced Simulations of Hypertrophic Obstructive Cardiomyopathy in Human Hear...Advanced Simulations of Hypertrophic Obstructive Cardiomyopathy in Human Hear...
Advanced Simulations of Hypertrophic Obstructive Cardiomyopathy in Human Hear...
 
Cfx12 04 solver
Cfx12 04 solverCfx12 04 solver
Cfx12 04 solver
 
Combustion modelling using_ansys_cfx
Combustion modelling using_ansys_cfxCombustion modelling using_ansys_cfx
Combustion modelling using_ansys_cfx
 
CFX Certificate
CFX CertificateCFX Certificate
CFX Certificate
 
CFX:Mixing T-Junction
CFX:Mixing T-JunctionCFX:Mixing T-Junction
CFX:Mixing T-Junction
 
Cfx12 02 intro_cfx
Cfx12 02 intro_cfxCfx12 02 intro_cfx
Cfx12 02 intro_cfx
 
Artificial reefs
Artificial reefsArtificial reefs
Artificial reefs
 
Simulations of Hypertrophic Obstructive Cardiomyopathy (HOCM) in a Human Hear...
Simulations of Hypertrophic Obstructive Cardiomyopathy (HOCM) in a Human Hear...Simulations of Hypertrophic Obstructive Cardiomyopathy (HOCM) in a Human Hear...
Simulations of Hypertrophic Obstructive Cardiomyopathy (HOCM) in a Human Hear...
 
Cfx12 11 cel_printing
Cfx12 11 cel_printingCfx12 11 cel_printing
Cfx12 11 cel_printing
 
Cfx12 01 intro_cfd
Cfx12 01 intro_cfdCfx12 01 intro_cfd
Cfx12 01 intro_cfd
 
HLPW2-sasanapuri
HLPW2-sasanapuriHLPW2-sasanapuri
HLPW2-sasanapuri
 
HPC Parallel Computing for CFD - Customer Examples (2 of 4)
HPC Parallel Computing for CFD - Customer Examples (2 of 4)HPC Parallel Computing for CFD - Customer Examples (2 of 4)
HPC Parallel Computing for CFD - Customer Examples (2 of 4)
 
Numerical simulation of blood flow in flexible arteries using Fluid-Structure...
Numerical simulation of blood flow in flexible arteries using Fluid-Structure...Numerical simulation of blood flow in flexible arteries using Fluid-Structure...
Numerical simulation of blood flow in flexible arteries using Fluid-Structure...
 
Finite Element Simulations with ANSYS Workbench 2012
Finite Element Simulations with ANSYS Workbench 2012Finite Element Simulations with ANSYS Workbench 2012
Finite Element Simulations with ANSYS Workbench 2012
 
ANSYS Workbench
ANSYS WorkbenchANSYS Workbench
ANSYS Workbench
 
Ansys tutorial
Ansys tutorialAnsys tutorial
Ansys tutorial
 
Mechanics of materials solution manual (3 rd ed , by beer, johnston, & dewolf)
Mechanics of materials solution manual (3 rd ed , by beer, johnston, & dewolf)Mechanics of materials solution manual (3 rd ed , by beer, johnston, & dewolf)
Mechanics of materials solution manual (3 rd ed , by beer, johnston, & dewolf)
 

Similaire à Cfx12 11 cel

The Ring programming language version 1.9 book - Part 28 of 210
The Ring programming language version 1.9 book - Part 28 of 210The Ring programming language version 1.9 book - Part 28 of 210
The Ring programming language version 1.9 book - Part 28 of 210Mahmoud Samir Fayed
 
Basic concept of MATLAB.ppt
Basic concept of MATLAB.pptBasic concept of MATLAB.ppt
Basic concept of MATLAB.pptaliraza2732
 
Programming for Mechanical Engineers in EES
Programming for Mechanical Engineers in EESProgramming for Mechanical Engineers in EES
Programming for Mechanical Engineers in EESNaveed Rehman
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly LanguageAhmed M. Abed
 
Functional Programming Languages slidesslies.ppt
Functional Programming Languages slidesslies.pptFunctional Programming Languages slidesslies.ppt
Functional Programming Languages slidesslies.pptBikalAdhikari4
 
Chapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesChapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesHeman Pathak
 
DMN 1-4 and Beyond
DMN 1-4 and BeyondDMN 1-4 and Beyond
DMN 1-4 and BeyondDenis Gagné
 
Unit 1 - Optimization methods.pptx
Unit 1 - Optimization methods.pptxUnit 1 - Optimization methods.pptx
Unit 1 - Optimization methods.pptxssuser4debce1
 
The Ring programming language version 1.8 book - Part 26 of 202
The Ring programming language version 1.8 book - Part 26 of 202The Ring programming language version 1.8 book - Part 26 of 202
The Ring programming language version 1.8 book - Part 26 of 202Mahmoud Samir Fayed
 
Micro-Benchmarking Considered Harmful
Micro-Benchmarking Considered HarmfulMicro-Benchmarking Considered Harmful
Micro-Benchmarking Considered HarmfulThomas Wuerthinger
 
Signals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchSignals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchAmairullah Khan Lodhi
 
02 functions, variables, basic input and output of c++
02   functions, variables, basic input and output of c++02   functions, variables, basic input and output of c++
02 functions, variables, basic input and output of c++Manzoor ALam
 
Traduccion a ensamblador
Traduccion a ensambladorTraduccion a ensamblador
Traduccion a ensambladortre_na_gil
 
CSC8503 Principles of Programming Languages Semester 1, 2015.docx
CSC8503 Principles of Programming Languages Semester 1, 2015.docxCSC8503 Principles of Programming Languages Semester 1, 2015.docx
CSC8503 Principles of Programming Languages Semester 1, 2015.docxfaithxdunce63732
 

Similaire à Cfx12 11 cel (20)

CFD & ANSYS FLUENT
CFD & ANSYS FLUENTCFD & ANSYS FLUENT
CFD & ANSYS FLUENT
 
The Ring programming language version 1.9 book - Part 28 of 210
The Ring programming language version 1.9 book - Part 28 of 210The Ring programming language version 1.9 book - Part 28 of 210
The Ring programming language version 1.9 book - Part 28 of 210
 
Basic concept of MATLAB.ppt
Basic concept of MATLAB.pptBasic concept of MATLAB.ppt
Basic concept of MATLAB.ppt
 
Programming for Mechanical Engineers in EES
Programming for Mechanical Engineers in EESProgramming for Mechanical Engineers in EES
Programming for Mechanical Engineers in EES
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
Functional Programming Languages slidesslies.ppt
Functional Programming Languages slidesslies.pptFunctional Programming Languages slidesslies.ppt
Functional Programming Languages slidesslies.ppt
 
Operators
OperatorsOperators
Operators
 
Chapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesChapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming Languages
 
Matlab-3.pptx
Matlab-3.pptxMatlab-3.pptx
Matlab-3.pptx
 
DMN 1-4 and Beyond
DMN 1-4 and BeyondDMN 1-4 and Beyond
DMN 1-4 and Beyond
 
Unit 1 - Optimization methods.pptx
Unit 1 - Optimization methods.pptxUnit 1 - Optimization methods.pptx
Unit 1 - Optimization methods.pptx
 
The Ring programming language version 1.8 book - Part 26 of 202
The Ring programming language version 1.8 book - Part 26 of 202The Ring programming language version 1.8 book - Part 26 of 202
The Ring programming language version 1.8 book - Part 26 of 202
 
Wk1to4
Wk1to4Wk1to4
Wk1to4
 
Micro-Benchmarking Considered Harmful
Micro-Benchmarking Considered HarmfulMicro-Benchmarking Considered Harmful
Micro-Benchmarking Considered Harmful
 
Signals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchSignals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 Batch
 
02 functions, variables, basic input and output of c++
02   functions, variables, basic input and output of c++02   functions, variables, basic input and output of c++
02 functions, variables, basic input and output of c++
 
Traduccion a ensamblador
Traduccion a ensambladorTraduccion a ensamblador
Traduccion a ensamblador
 
Matlab Manual
Matlab ManualMatlab Manual
Matlab Manual
 
CSC8503 Principles of Programming Languages Semester 1, 2015.docx
CSC8503 Principles of Programming Languages Semester 1, 2015.docxCSC8503 Principles of Programming Languages Semester 1, 2015.docx
CSC8503 Principles of Programming Languages Semester 1, 2015.docx
 
1. Ch_1 SL_1_Intro to Matlab.pptx
1. Ch_1 SL_1_Intro to Matlab.pptx1. Ch_1 SL_1_Intro to Matlab.pptx
1. Ch_1 SL_1_Intro to Matlab.pptx
 

Dernier

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 

Dernier (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 

Cfx12 11 cel

  • 1. 11-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Chapter 11 CFX Expression Language (CEL) Introduction to CFX
  • 2. CFX Expression Language 11-2 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • CEL - CFX Expression Language – Allows the user to create equations (can be functions of solution/system variables) that can be used in CFX-Pre and CFD-Post • Example: CEL
  • 3. CFX Expression Language 11-3 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • The syntax rules are the same as those for conventional arithmetic. Operators are written as: + (addition) - (subtraction) * (multiplication) / (division) ^ (exponentiation) • Variables and expressions are case sensitive (example: t vs. T) • Expressions must be dimensionally consistent for addition and subtraction operations (example: 1.0 [mm] + 0.45 [yds] is OK) – You cannot add values with inconsistent dimensions • Fractional and decimal powers are allowed (example: a^(1/2) + 1.0^0.5) • Units of expressions are not declared – they are the result of units in the expression (example: a [kg m^-3] * b [m s^-1] has units of [kg m^-2 s^-1] • Some constants are also available in CEL for use in expressions: – e Constant: 2.7182818 – g Acceleration due to gravity: 9.806 [m s^-2] – pi Constant: 3.1415927 – R Universal Gas Constant: 8314.5 [m^2 s^-2 K^-1] CEL Rules
  • 4. CFX Expression Language 11-4 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • Numerical functions and operators are also available in CEL – Right-click when creating expressions for a complete list – Custom functions with User Fortran can also be created Function Operand’s Dimensions [x] Operand’s Values Result’s Dimensions sin(x) Angle Any Dimensionless cos(x) Angle Any Dimensionless tan(x) *** Angle Any Dimensionless asin(x) Dimensionless -1 ≤ x ≤ 1 Angle acos(x) Dimensionless -1 ≤ x ≤ 1 Angle atan(x) Dimensionless Any Angle exp(x) Dimensionless Any Dimensionless loge(x) Dimensionless 0 < x Dimensionless log10(x) Dimensionless 0 < x Dimensionless abs(x) Any Any [x] sqrt(x) Any 0 ≤ x [x]^0.5 if(test, res1, res2)* Any Any Any (res1 and res2 must have the same dimensions) min(x,y) **** Any Any [x] max(x,y) **** Any Any [x] step(x) * Dimensionless Any Dimensionless *if functions contain a test, and two result outcomes. The first outcome, res1 will be returned if test evaluates to true. If test evaluates to false, res2 is returned. Consider the following example, where we wish to set volume fraction to 1 when X is greater than 1 [m], and 0 if X is less than 1 [m]: if (x>1[m], 1, 0) In this case, if the result is precisely equal to 1[m], the result is (res1+res2)/2 **step(x) is 0 for negative x, 1 for positive x and 0.5 for x=0. *** note that tan(x) is undefined for nπ/2 where n=1, 3, 5 .. . **** both x and y must have the same dimensions. Built In Functions
  • 5. CFX Expression Language 11-5 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual x Direction 1 in Reference Coordinate Frame y Direction 2 in Reference Coordinate Frame z Direction 3 in Reference Coordinate Frame r Radial spatial location, r = (x^2+y^2)^0.5 theta Angle, arctan(y/x) t Time u Velocity in the x coordinate direction v Velocity in the y coordinate direction w Velocity in the z coordinate direction p (absolute) Pressure ke Turbulent kinetic energy ed Turbulent eddy dissipation T Temperature sstrnr Shear strain rate density Density rNoDim Non-dimensional radius (rotating frame only) viscosity Dynamic Viscosity Cp Specific Heat Capacity at Constant Pressure cond Thermal Conductivity AV name Additional Variable name mf Mass Fraction • Solver variables are available for use in any expression • Below is a partial list of the available system variables: – When creating expressions, right-click to access a full list Depending on your physics, some variables will not be valid – e.g. you need to solver heat transfer to use T Solver Variables
  • 6. CFX Expression Language 11-6 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training ManualHow To Create Expressions
  • 7. CFX Expression Language 11-7 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual To add more expressions (similar method in CFD-Post) How To Create Expressions Right-click in the Definition window to access Variables, Constants, Functions, Locators and existing Expressions
  • 8. CFX Expression Language 11-8 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual where γ is the shear strain rate • Creating a variable viscosity – Viscosity of a shear thickening fluid: 1− = n Kγµ Solver Variable and Expression Name are both accessed via the right mouse button CEL in CFX-Pre: Example 1
  • 9. CFX Expression Language 11-9 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • Alternatively, an expression can be entered directly into a field CEL in CFX-Pre: Example 1
  • 10. CFX Expression Language 11-10 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • Using an “if” Function – Set inlet temperature to 300 K for the first 19 iterations then raise it to 320 K after 20 iterations Solver variable accessed with the right mouse button Note: On the 21st iteration inlet temp = 310 K CEL in CFX-Pre: Example 2
  • 11. CFX Expression Language 11-11 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • You can also define your own 1-D linear, or 3-D cloud of points interpolation functions Import data points or add manually User Functions
  • 12. CFX Expression Language 11-12 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • Example: Having the timestep change with iteration number as shown here Timestep size is in seconds Continued on next slide... User Functions: Example Iteration Number is dimensionless
  • 13. CFX Expression Language 11-13 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • Example: Having the timestep change with iteration number as shown here User Functions: Example
  • 14. CFX Expression Language 11-14 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • Integrated quantities can be used in expressions to evaluate variables over some location – Examples: – Calculate the area average of Cp on an isosurface: areaAve(Cp)@iso1 – Mass flow of particular fluid through a locator: oil.massFlow()@slice1 • Available in CFX-Pre and CFD-Post – Usage is more strict in CFX-Pre • E.g. the argument supplied to the function must be a variable, not an expression • “@<locator>” syntax must always supply a named location used in the physics definition – A boundary condition name, a domain name, a monitor point name, etc. • To reference general mesh regions use the syntax “@REGION:<name>” • Phases/components can be referenced using: [<phase name>.][<component name>.]<function>@<locator> – E.g. Air.Nitrogen.massFlow()@outlet Integrated Quantities
  • 15. CFX Expression Language 11-15 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training ManualIntegrated Quantities • Some functions allow an x, y or z operator: – area_x()@boundary gives the area projected in the x-direction – force_z()@wall gives the z component of the force on the wall – See documentation for a full list • These functions also allow an optional coordinate frame: – force_z_MyCoord()@wall gives the z component of the force on the wall using the coordinate frame “MyCoord” • Each function requires either 0 or 1 arguments – areaAve requires 1 argument: areaAve(Temperature)@Wall – massFlow requires 0 arguments: massFlow()@Inlet • Return value units depend on the argument units – areaAve(Temperature)@Wall will return a value with units of Temperature
  • 16. CFX Expression Language 11-16 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual • Below is a partial list of functions – See documentation for a complete list – Right-clicking when creating an expression will show most functions Function Name and Syntax <required> [<optional>] area( )@<Location> Area of a boundary or interface. Any 2D region (e.g., boundary or interface) area_x( )@<Location> area_y( )@<Location> area_z( )@<Location> The (signed) component of the normal area vector in the local x, y or z direction. Any 2D region (e.g., a boundary or interface) areaAve(<var>)@<Location> Area-weighted average of <var> on a boundary. Any 2D region (e.g., a boundary or interface) areaInt(<var>)@<Location> Area-weighted integral of <var> on a boundary. Any 2D region (e.g., a boundary or interface) ave(<var>)@<Location> Arithmetic average of <var> within a domain or subdomain. Any 3D region (e.g., domain or subdomain) [<Fluid>.]force( )@<Location> The magnitude of the force vector on a boundary. Any 2D region (e.g., a wall) Operation Valid <Location> Integrated Quantities
  • 17. CFX Expression Language 11-17 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual Function Name and Syntax <required> [<optional>] [<Fluid>.]force_x( )@<Location> [<Fluid>.]force_y( )@<Location> [<Fluid>.]force_z( )@<Location> The (signed) component of the force vector in the local x, y or z direction. Any 2D region (e.g., a wall) inside()@<Location> Similar to the subdomain variable, but allows a specific 2D or 3D location to be given. Any 2D or 3D named sub- region of the physical location on which the expression is evaluated. mass()@<Location> The total mass within a domain or subdomain. This is fluid dependent. Any 3D region (e.g., domain or subdomain) massAve(<var>)@<Location> Mass-weighted average of <var> on a domain or subdomain. Any 3D region (e.g., domain or subdomain) massInt(<var>)@<Location> The mass-weighted integration of <var> within a domain or subdomain Any 3D region (e.g., domain or subdomain) [<Fluid>.]massFlow()@<Location> Mass flow through a boundary. Any fluid surfaces (e.g., Inlets, Outlets, Openings and fluid- fluid interfaces) [<Fluid>.]massFlowAve(<var>) @<Location> Mass flow weighted average of <var> on a boundary. Any fluid surfaces (e.g., Inlets, Outlets, Openings and fluid- fluid interfaces) Operation Valid <Location> Integrated Quantities
  • 18. CFX Expression Language 11-18 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training Manual Function Name and Syntax <required> [<optional>] [<Fluid>.]massFlowAveAbs(<var>) @<Location> Absolute mass flow weighted average of <var> on a boundary. Any fluid surfaces (e.g., Inlets, Outlets, Openings and fluid- fluid interfaces) [<Fluid>.]massFlowInt(<var>) @<Location> Mass flow weighted integration of <var> on a boundary. Any fluid surfaces (e.g., Inlets, Outlets, Openings and fluid- fluid interfaces) maxVal(<var>)@<Location> Maximum Value of <var> within a domain or subdomain. Any 3D region (e.g., domain or subdomain) minVal(<var>)@<Location> Minimum Value of <var> within a domain or subdomain. Any 3D region (e.g., domain or subdomain) probe(<var>)@<Location> Returns the value of the specified variable on the specified Point locator. Any point object (e.g., a Source Point or Cartesian Monitor Point) rmsAve(<var>)@<Location> RMS average of <var> within a domain. Any 3D region (e.g., domain or subdomain) sum(<var>)@<Location> Sum of <var> over all domain or subdomain vertices. Any 3D region (e.g., domain or subdomain) Operation Valid <Location> Integrated Quantities
  • 19. CFX Expression Language 11-19 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002598 Training ManualUseful Functions • The inside() function returns 1 when inside the specified location and 0 when outside – Useful to limit the scope of a function to a subdomain or boundary • The step() function return 1 when the argument is positive and 0 when the argument is negative – Useful as an on-off switch – if() function can also be used as a switch • areaAve() and massFlowAve() are used to evaluate the average of a quantity on a location – areaAve() is an area-weighted average. It is usually used on wall boundaries and when the quantity is not “carried with the flow”, e.g. Pressure at an outlet, Temperature on a wall – massFlowAve() is an average weighted by the local mass flow. It is usually used to evaluate quantities that are “carried with the flow”, e.g. Temperature at an outlet