Setting Up User Field Functions

Create the field functions that are required for this tutorial.

This tutorial makes extensive use of field functions to define case parameters, to set up boundary conditions, and to analyze and present results.

For convenience, these field functions can be set up by running a macro before you set up any models.

To create the user field functions:

  1. Select File > Macro > Play Macro.
  2. In the Open dialog, navigate to your working directory and select wb_setupFieldFunctions.java.
  3. Click the Open button to run the macro.

The field functions are tabulated below:

Case Parameter Field Functions

EquivalentDiameter

Type Scalar
Definition 0.0154
Ignore Boundary Values Deactivated

HeatedLength

Type Scalar
Definition 2.0
Ignore Boundary Values Deactivated

SystemPressure

Type Scalar
Definition 4500000.0
Ignore Boundary Values Deactivated

SaturationTemperature

Type Scalar
Definition 530.59
Ignore Boundary Values Deactivated

InletDensity

Type Scalar
Definition 832.06
Ignore Boundary Values Deactivated

InletMassFlux

Type Scalar
Definition 900.0
Ignore Boundary Values Deactivated

InletTemperature

Type Scalar
Definition 470.63
Ignore Boundary Values Deactivated

InletVelocity

Type Vector
Definition [ $InletMassFlux/$InletDensity, 0, 0 ]
Ignore Boundary Values Deactivated

WallHeatFlux

Type Scalar
Definition 570000.0
Ignore Boundary Values Deactivated

Model Field Functions

IterationsToFullPower

Type Scalar
Definition 200.0
Ignore Boundary Values Deactivated

WallHeatFluxDistribution

Type Scalar
Definition ($$Centroid[0] > 0 && $$Centroid[0] < $HeatedLength) ? $WallHeatFlux : 0.0
Ignore Boundary Values Deactivated

WallHeatFluxIterationRamp

Type Scalar
Definition ( $Iteration < $IterationsToFullPower ? ($WallHeatFluxDistribution * $Iteration )/ $IterationsToFullPower : $WallHeatFluxDistribution )
Ignore Boundary Values Deactivated
dMax
Type Scalar
Definition 0.012
Ignore Boundary Values Deactivated
dMin
Type Scalar
Definition 1.0E-6
Ignore Boundary Values Deactivated

ClippedSauterMeanDiameter

Type Scalar
Definition ( $SauterMeanDiameterVapor < $dMin ? $dMin : ( $SauterMeanDiameterVapor > $dMax ? $dMax : $SauterMeanDiameterVapor ) )
Ignore Boundary Values Deactivated

Analysis Field Functions

InletThermodynamicQuality

Type Scalar
Definition $SpecificHeatLiquid * ($InletTemperature - $SaturationTemperature)/ ${LatentHeatLiquid Vapor Interface}
Ignore Boundary Values Deactivated

ThermodynamicQuality

Type Scalar
Definition $InletThermodynamicQuality+ 4 * $WallHeatFlux * $$Centroid[0]/ ( $InletMassFlux * ${LatentHeatLiquid Vapor Interface} * $EquivalentDiameter )
Ignore Boundary Values Deactivated

LiquidSubcooling

Type Scalar
Definition ${TemperatureLiquid Vapor Interface} - ${TemperatureLiquid}
Ignore Boundary Values Activated

WallSuperHeat

Type Scalar
Definition ${TemperatureLiquid} - ${TemperatureLiquid Vapor Interface}
Ignore Boundary Values Deactivated

QuenchingHeatFlux

Type Scalar
Definition (1-${WallDryoutAreaFractionLiquid Vapor Interface}) * ${BubbleInducedQuenchingHeatTransferCoefficientLiquid Vapor Interface} * ${BubbleInducedQuenchingTemperatureFactorLiquid Vapor Interface} * ( $WallSuperHeat + $LiquidSubcooling )
Ignore Boundary Values Deactivated

WallEvaporationRate

Type Scalar
Definition -${WallInterphaseMassFluxLiquid Vapor Interface}
Ignore Boundary Values Deactivated

BulkCondensationRate

Type Scalar
Definition ( ${InterphaseMassTransferRateLiquid Vapor Interface} > 0 ? ${InterphaseMassTransferRateLiquid Vapor Interface} : 0 )
Ignore Boundary Values Deactivated

BulkEvaporationRate

Type Scalar
Definition ( ${InterphaseMassTransferRateLiquid Vapor Interface} < 0 ? -${InterphaseMassTransferRateLiquid Vapor Interface} : 0 )
Ignore Boundary Values Deactivated