Module Related Variables
Each physics module in Creo Flow Analysis has variables and integrated quantities in the Expression Editor associated with it. The specific variable names available for a module are listed in module related expressions. The expression module[.subname].exists checks if a module exists in the current project.
Example 10 :
disp = trans_1D_1CV.displacement
pre = flow.P
temp = (heat.exists?) heat.T : 300
Dependent or Independent Variables
The dependent and independent variables primary, property, and derived for a given module are available for access and use in expressions throughout Creo Flow Analysis when you activate the respective module. These dependent and independent variables correspond to arrays with values at every cell in the solution domain.
The general format for a primary, property and derived variable in the expression editor is module[.subname].var
Characteristics of dependent and independent variables include the following:
• Correspond to the list of variables, although the specific variable names may be different.
• Variable names for the primary, property and derived variables available for expressions appear in the filename_points.txt file. If you run the code with a point probe activated, then you can generate this file to determine the probable name for a given variable in the code.
• You can use variable names that are not listed in the points.txt file, such as the Flow module variable Velocity Vector V.
• An incorrect or unavailable variable name generates an error message when you try to save it.
• You can create dependent variables in the form of derived variables through the display variable function. An example of the use of a Derived Variable in the Expression Editor is provided below:
◦ Common Module—Shared module in Creo Flow Analysis. It follows a different convention than the other modules, where the term “share” is used instead of “common” as the module_name, such that share.var_name is used instead of common.var_name. Alternatively, the name “share” can be let out entirely such that share.var_name reduces to simply name.
▪ share.density or share.rho: density [kg/m3]
▪ share.porosity or share.por:porosity [ ]
▪ share.cells_vol: cell volume [m3]
◦ Flow module
▪ flow.pressure or flow.P: pressure [Pa]
▪ flow.V:(vector) velocity [m/s]
▪ flow.u/flow.v/flow.w:cartesian velocity components [m/s]
▪ flow.viscosity or flow.mu: laminar dynamic viscosity [Pa-s]
▪ flow.totalP: total pressure [Pa]
▪ flow.vMag: velocity magnitude [m/s]
▪ flow.labVr/flow.labVt/flow.labVa: velocity components in radial/ tangential/axial direction [m/s]
▪ flow.relVr/flow.relVt/flow.relVa: relative velocity components in radial/ tangential/axial direction [m/s]
▪ flow.relVelocity: (vector) relative velocity [m/s]
▪ flow.vrMag: relative velocity magnitude [m/s]
▪ flow.vorticity: (vector) vorticity [1/s]
▪ flow.vorticityMag: vorticity magnitude [1/s]
▪ flow.mach: Mach number [ ]
▪ flow.sspd: speed of sound [m/s]
◦ Cavitation module
▪ cavitation.Fgas: free gas mass fraction [ ]
▪ cavitation.Fvap: vapor mass fraction [ ]
▪ cavitation.Dgas: dissolved gas mass fraction [ ]
▪ cavitation.volFracGas: free gas volume fraction [ ]
▪ cavitation.volFracVap: vapor volume fraction [ ]
▪ cavitation.volFracDGas: dissolved gas volume fraction [ ]
▪ cavitation.volFracT: total gas phase volume fraction [ ]
▪ cavitation.damagepower: cavitation damage power [W]
◦ Turbulence module
▪ turbulence.tke: turbulent kinetic energy [m2/s2]
▪ turbulence.ted: turbulent kinetic energy dissipation [m2/s3]
▪ turbulence.muT: turbulent viscosity [Pa-s]
◦ Heat module
▪ heat.temperature or heat.T: temperature [K]
▪ heat.conductivity or heat.K: heat conductivity [W/m-K]
▪ heat.capacity or heat.C: heat capacity [J/kg-K]
▪ heat.Ht: total enthalpy [J/kg]
▪ heat.Et: total internal energy [J/kg]
▪ heat.Tt: total temperature [K]
◦ Species module
▪ species[.subname].concentraction or species.[subname].C: concentration [ ]
▪ species.[subname].D: diffusivity [m2/s]
◦ Multicomponent module
▪ component[.subname].C: component concentration [ ]
▪ component[.subname].D: component diffusivity [m2/s]
▪ component[.subname].soretDiff: Soret diffusivity [m2/s]
▪ flowcomp[.subname].viscosity: component viscosity [Pa -s]
▪ heatcomp[.subname].K: heat conductivity [W/m -K]
▪ heatcomp[.subname].C: component heat capacity [J/kg]
▪ sharecomp[.subname].rho: component density [kg/m3]
◦ Multiphase module
▪ phasecomp[.subname].vFrac: component volume fraction [ ]
▪ flowphasecomp[.subname].viscosity: component viscosity [Pa-s]
▪ heatphasecomp[.subname].K: component heat conductivity [W/m-K]
▪ heatphasecomp[.subname].C: component heat capacity [J/kg-K]
▪ sharephasecomp[.subname].rho: component density [kg/m3]
Example
air_visc = flowphasecomp.air.viscosity
◦ Dynamics module
▪ Dynamics Translation module
▪ trans_1d[.subname].displacement: displacement [m]
▪ trans_1d[.subname].velocity: velocity [m/s]
▪ trans_1d[.subname].accelaration: accelaration [m/s2]
▪ trans_1d[.subname].force: force [N]
▪ Dynamics Rotation module
▪ rotate_1d[.subname].angle: angle [rad]
▪ rotate_1d[.subname].omega: angular velocity [rad/s]
▪ rotate_1d[.subname].rpm: rotational speed in revolution per minute [rpm]
▪ rotate_1d[.subname].torque: torque [N-m]
▪ rotate_1d[.subname].accelaration: angular accelaration [rad/s2]
▪ Advanced Variables in Dynamics module
The following variables are ODE solutions before application of constraints, and corrections based on constraints. They can be used with more complicated constraints such as 2-dimensional motion inside a circle.
▪ trans_1d[.subname].ode_displacement: initial ODE solution for displacement [m]
▪ trans_1d[.subname].ode_velocity: initial ODE solution for velocity [m/s]
▪ rotate_1d[.subname].ode_displacement: initial ODE solution for angular displacement [rad]
▪ rotate_1d[.subname].ode_velocity: initial ODE solution for angular velocity [rad/s]
Examples
▪ dy = trans_1d.Y.ode_displacement
▪ domega = rotate_1d.Y.ode_velocity