Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Phase Change
Introduction
This example demonstrates how to model a phase change and predict its impact on a heat transfer analysis. When a material changes phase, for instance from solid to liquid, energy is added to the solid. Instead of creating a temperature rise, the energy alters the materials molecular structure. Equations for the latent heat of phase changes appear in many texts (see Ref. 1, Ref. 2, and Ref. 3) but their implementation is nonstandard. Heat consumed or released by a phase change affects fluid flow, magma movement and production, chemical reactions, mineral stability, and many other earth-science applications.
Figure 1: Material properties as functions of temperature. This 1D example uses the Heat Transfer in Porous Media physic from the Heat Transfer Module to examine transient temperature transfer in a rod of ice that heats up and changes to water. In particular, the model demonstrates how to handle material properties that vary as a function of temperature.
2012 COMSOL
1 |
PHASE CHANGE
This model proceeds as follows. First, estimate the ice-to-water phase change using the transient conduction equation with the latent heat of fusion. Next, compare the first solution to estimates that neglect latent heat. Finally, run additional simulations to evaluate impacts of the temperature interval over which the phase change occurs.
Model Definition
This model describes the ice-to-water phase change along a 1-cm rod of ice. At its left end the rod is insulated, and at the other temperature is maintained at 80C. Values for thermal properties depend on the phase. For ice, density is 918 kg/m3, the specific heat capacity is 2052 J/(kgK), and the thermal conductivity is 2.31 W/(mK). For water, the density, specific heat capacity, and thermal conductivity are 997 kg/m3, 4179 J/(kgK), and 0.613 W/(mK), respectively. Reference temperatures are 265 K for ice and 300 K for water. The latent heat of fusion lm is 333.5 kJ/kg. The starting temperature in the rod is 20 C. During the ice-to-water phase change, the density is modified, resulting in a volume compression. The Lagrangian coordinates express all transformations in the initial coordinate system. They are thus more appropriate for this model since the deformations need not to be accounted for. The conduction equation in Lagrangian coordinates is T ice C eq ------ + ( k eq T ) = Q t where ice is the ice density (the density at the first timestep), Ceq is the effective specific heat capacity (J/kgK), T is temperature (K), keq is the effective thermal conductivity (W/mK), and Q is a heat source (W/m3). Ceq and keq typically are volume averages of the form C eq =
i Cpi
i
(1)
where is the volumetric content, and Cp is the specific heat capacity (J/(kgK)) of a liquid or a solid. In this problem, however, you modify Ceq to incorporate the latent heat of fusion so that C eq =
i ( Cpi + D )
i
(2)
2 |
PHASE CHANGE
2012 COMSOL
It describes latent heat using the latent heat of fusion lm (J/kg) for only the normalized pulse D (K-1) in the phase change temperature range from T0 to T1. The integral of D must equal unity to satisfy the following
T ice D ( T )lm dT =
0
T1
ice
(3)
such that the pulse width denotes the range between the liquidus and solidus temperatures. The boundary conditions for this model are insulating at x = 0 and fixed temperature at x = 0.01. n ( k eq T ) = 0 T = T hot Origin Heat source
The fixed heat source temperature creates a temperature discontinuity at the starting time. You can thus replace Thot by a smoothed step function Tright that increases the temperature from T0 to Thot in 0.1 s. The boundary condition becomes n ( k eq T ) = 0 T = T right ( t ) where t denotes time. Origin Heat source
2012 COMSOL
3 |
PHASE CHANGE
Figure 2: Temperature estimates with latent heat at t = 0 s, 15 s, 30 s, 45 s, 60 s, and 2 min, 3 min, 4 min, ..., 20 min. The distributions all level out around the 0C temperature point because not all of the energy is going toward a temperature rise; some is being absorbed to change the molecular structure and change the phase.
4 |
PHASE CHANGE
2012 COMSOL
The solution in Figure 3 shows temperature estimates for the simulation without latent heat.
Figure 3: Temperature estimates without latent heat at t = 0 s, 15 s, 30 s, 45 s, 60 s, and 2 min, 3 min, 4 min, ..., 20 min. A change of profile also occur at 0C but is less visible. Since latent heat is not accounted, this change is here due to the different thermophysical properties of water before and after 0C. Figure 4 shows results for different solid-to-liquid intervals at three times. The smaller the interval, the sharper the bend in the temperature profile at zero temperature, T. In the simulations, narrowing the temperature interval to a step change, for example,
2012 COMSOL
5 |
PHASE CHANGE
comes at a large computational cost. In the figure, the results for the wide and narrow pulses compare closely.
Figure 4: Temperature estimates for different temperature intervals for latent heat consumption. Estimates are for dT intervals of 0.1 (solid line), 0.5 (dashed line), and 2.5 (dotted line) at t = 30 s (blue), 5 min (green), and 10 min (red).
T d T dT =
0
T1
dH
6 |
PHASE CHANGE
2012 COMSOL
the pulse D can be chosen to be the derivative of H with respect to temperature to satisfy Equation 3. You can then express D with the COMSOL Multiphysics differentiation operator, d, as in d(H(T),T). To find out more about implementing this and other smoothing functions, see the COMSOL Multiphysics Users Guide under Global and Local Definitions > Global and Local Functions > Specifying Discontinuous Functions on page 170 as well as the COMSOL Multiphysics Reference Guide.
References
1. S.E. Ingebritsen and W.E. Sanford, Groundwater in Geologic Processes, Cambridge University Press, 1998. 2. N.H. Sleep and K. Fujita, Principles of Geophysics, Blackwell Science Ltd, 1997. 3. D.L. Turcotte and G. Schubert, Geodynamics, Applications of Continuum Physics to Geological Problems, 2nd ed., Cambridge University Press, 2002.
Modeling Instructions
MODEL WIZARD
1 In the Model Builder window, click Untitled.mph. 2 Go to the Model Wizard window. 3 Click the 1D button. 4 Click Next. 5 In the Add physics tree, select Heat Transfer>Heat Transfer in Porous Media (ht). 6 Click Next. 7 Find the Studies subsection. In the tree, select Preset Studies>Time Dependent. 8 Click Finish.
The Heat Transfer in Porous Media physic solves for the temperature and automatically calculates the equivalent conductivity and the equivalent specific heat capacity as described in Equation 1 and Equation 2.
2012 COMSOL
7 |
PHASE CHANGE
GEOMETRY 1
Interval 1
1 In the Model Builder window, under Model 1 right-click Geometry 1 and choose Interval. 2 In the Interval settings window, locate the Interval section. 3 In the Right endpoint edit field, type 0.01. 4 Click the Build Selected button.
Form Union
1 In the Model Builder window, under Model 1>Geometry 1 right-click Form Union and
The following steps describe how the model parameters are defined. Furthermore, H is defined as a smoothed step function and its derivative D as an analytical function.
Parameters
1 In the Model Builder window, right-click Global Definitions and choose Parameters. 2 In the Parameters settings window, locate the Parameters section. 3 In the table, enter the following settings:
NAME EXPRESSION DESCRIPTION
0[degC] 1[K] 333.5[kJ/kg] -20[degC] 80[degC] 918[kg/m^3] 2052[J/kg/K] 2.31[W/m/K] 997[kg/m^3] 4179[J/kg/K] 0.613[W/m/K]
Transition temperature Transition interval Latent heat of fusion Initial temperature of the rod Temperature of hot water Density of ice Specific heat capacity of ice Thermal conductivity of ice Density of water Specific heat capacity of water Thermal conductivity of water
8 |
PHASE CHANGE
2012 COMSOL
Step 1
1 In the Model Builder window, right-click Global Definitions and choose Functions>Step. 2 In the Step settings window, locate the Function Name section. 3 In the Function name edit field, type H. 4 Locate the Parameters section. In the Location edit field, type T_trans. 5 Click to expand the Smoothing section. In the Size of transition zone edit field, type
dT.
Step 2
1 In the Model Builder window, right-click Global Definitions and choose Functions>Step. 2 In the Step settings window, locate the Function Name section. 3 In the Function name edit field, type T_right. 4 Locate the Parameters section. In the Location edit field, type 0.05. 5 In the From edit field, type T_0. 6 In the To edit field, type T_hot.
2012 COMSOL
9 |
PHASE CHANGE
7 Click to expand the Smoothing section. In the Size of transition zone edit field, type
0.1.
Analytic 1
1 In the Model Builder window, right-click Global Definitions and choose Functions>Analytic. 2 In the Analytic settings window, locate the Function Name section. 3 In the Function name edit field, type D. 4 Locate the Parameters section. In the Expression edit field, type d(H(x),x). 5 Locate the Units section. In the Arguments edit field, type K. 6 In the Function edit field, type 1/K. 7 Click to expand the Plot Parameters section. In the table, enter the following
settings:
LOWER LIMIT UPPER LIMIT
270
276
10 |
PHASE CHANGE
2012 COMSOL
You can only plot the analytical function D if you define the argument range in which the function should be plotted. This is done in the the last few steps described above.
DEFINITIONS
Variables 1
1 In the Model Builder window, under Model 1 right-click Definitions and choose Variables. 2 In the Variables settings window, locate the Variables section. 3 In the table, enter the following settings:
NAME EXPRESSION DESCRIPTION
theta_water theta_ice
H(T[1/K]) 1-theta_water
H E A T TR A N S F E R I N PO RO U S M E D I A
Now the material properties for ice and water are entered in the Heat Transfer in Porous Media physic.
2012 COMSOL
11 |
PHASE CHANGE
Porous Matrix 1
1 In the Model Builder window, under Model 1>Heat Transfer in Porous Media click Porous Matrix 1. 2 In the Porous Matrix settings window, locate the Immobile Solids section. 3 In the p edit field, type theta_ice. 4 Locate the Heat Conduction section. From the kp list, choose User defined. In the
Initial Values 1
1 In the Model Builder window, under Model 1>Heat Transfer in Porous Media click Initial Values 1. 2 In the Initial Values settings window, locate the Initial Values section. 3 In the T edit field, type T_0.
Temperature 1
1 In the Model Builder window, right-click Heat Transfer in Porous Media and choose
12 |
PHASE CHANGE
2012 COMSOL
MESH 1
Following the steps below, a relatively fine mesh of 120 elements is generated.
Edge 1
In the Model Builder window, under Model 1 right-click Mesh 1 and choose Edge.
Distribution 1
1 In the Model Builder window, under Model 1>Mesh 1 right-click Edge 1 and choose Distribution. 2 In the Distribution settings window, locate the Distribution section. 3 In the Number of elements edit field, type 120. 4 Click the Build Selected button.
STUDY 1
2012 COMSOL
13 |
PHASE CHANGE
All the parameter values in this model have a time unit of seconds, so the output time you enter here gives a total simulation time of 20 minutes. Different output intervals can be generated by adding other range commands as it is done above. Within the first minute, solution data is stored every 15 seconds, whereas for the remaining simulation period, the data is only stored every 60 seconds.
RESULTS
Temperature (ht)
A line plot of the temperature distribution along the rod for all times is automatically produced. To generate Figure 2, only the temperature unit has to be changed.
1 In the Model Builder window, under Results>Temperature (ht) click Line Graph 1. 2 In the Line Graph settings window, locate the y-Axis Data section. 3 From the Unit list, choose degC. 4 Click the Plot button.
Parameters
1 In the Model Builder window, under Global Definitions click Parameters. 2 In the Parameters settings window, locate the Parameters section. 3 In the table, enter the following settings:
NAME EXPRESSION DESCRIPTION
lm lm_original ROOT
0 333.5[kJ/kg]
In the Model Builder window, right-click the root node and choose Add Study.
14 |
PHASE CHANGE
2012 COMSOL
MODEL WIZARD
1 Go to the Model Wizard window. 2 Find the Studies subsection. In the tree, select Preset Studies>Time Dependent. 3 Click Finish.
STUDY 2
Temperature (ht) 1
1 In the Model Builder window, under Results right-click Temperature (ht) 1 and choose Rename. 2 Go to the Rename 1D Plot Group dialog box and type Temperature (ht) 1, no
latent heat in the New name edit field.
2012 COMSOL
15 |
PHASE CHANGE
3 Click OK.
To generate Figure 3, only the units in the automatically generated temperature plot have to be changed.
To be able to keep track of the different studies, rename the data sets containing the solutions of study 1 and study 2.
Data Sets
1 In the Model Builder window, under Results>Data Sets right-click Solution 1 and
choose Rename.
2 Go to the Rename Solution dialog box and type Solution 1, lm included in the New name edit field. 3 Click OK. 4 Right-click Results>Data Sets>Solution 2 and choose Rename. 5 Go to the Rename Solution dialog box and type Solution 2, lm excluded in the New name edit field. 6 Click OK.
Parameters
1 In the Parameters settings window, locate the Parameters section. 2 In the table, enter the following settings:
EXPRESSION
lm_original
16 |
PHASE CHANGE
2012 COMSOL
ROOT
In the Model Builder window, right-click the root node and choose Add Study.
MODEL WIZARD
1 Go to the Model Wizard window. 2 Find the Studies subsection. In the tree, select Preset Studies>Time Dependent. 3 Click Finish.
STUDY 3
Following the steps below, the temperature distribution of the rod is calculated for different values of the transition interval by just adding a parametric sweep to the study node. In this example, the values 0.1 K, 0.5 K and 2.5 K are taken for dT.
Parametric Sweep
1 In the Model Builder window, right-click Study 3 and choose Parametric Sweep. 2 In the Parametric Sweep settings window, locate the Study Settings section.
2012 COMSOL
17 |
PHASE CHANGE
dT
0.5 1 2
Again, the temperature distribution along the rod for all time steps and dT-values is produced automatically. You can modify this plot to generate Figure 4 by following the steps below.
RESULTS
Temperature (ht) 1
1 In the 1D Plot Group settings window, click to expand the Title section. 2 From the Title type list, choose None. 3 In the Model Builder window, expand the Temperature (ht) 1 node, then click Line Graph 1. 4 In the Line Graph settings window, locate the Data section. 5 From the Data set list, choose Solution 4. 6 From the Parameter selection (dT) list, choose First. 7 From the Time selection list, choose Interpolated. 8 In the Times edit field, type 30. 9 Locate the y-Axis Data section. From the Unit list, choose degC. 10 Locate the Coloring and Style section. Find the Line style subsection. From the Color
18 |
PHASE CHANGE
2012 COMSOL
1 In the Model Builder window, under Results>Temperature (ht) 1 right-click Line Graph 8 1 and choose Duplicate. 1 In the Line Graph settings window, locate the Data section. 9 2 From the Parameter selection (dT) list, choose Last. 0 2 Locate the Coloring and Style section. Find the Line style subsection. From the Line 1
2 In the Model Builder window, select Results>Temperature (ht) 1>Line Graph 1, 3 Results>Temperature (ht) 1>Line Graph 2, Results>Temperature (ht) 1>Line Graph 3. 2 In the Model Builder window, under Results>Temperature (ht) 1 right-click Line Graph 4 3 and choose Duplicate. 2 In the Model Builder window, select Results>Temperature (ht) 1>Line Graph 4, 5 Results>Temperature (ht) 1>Line Graph 5, Results>Temperature (ht) 1>Line Graph 6. 2 In the Model Builder window, under Results>Temperature (ht) 1 click Line Graph 4. 6 2 In the Line Graph settings window, locate the Data section. 7 2 In the Times edit field, type 300. 8
2012 COMSOL
19 |
PHASE CHANGE
29 Locate the Coloring and Style section. Find the Line style subsection. From the Color
39 In the Model Builder window, select Results>Temperature (ht) 1>Line Graph 1, Results>Temperature (ht) 1>Line Graph 2, Results>Temperature (ht) 1>Line Graph 3. 40 In the Model Builder window, under Results>Temperature (ht) 1 right-click Line Graph 3 and choose Duplicate.
20 |
PHASE CHANGE
2012 COMSOL
4 In the Model Builder window, select Results>Temperature (ht) 1>Line Graph 7, 1 Results>Temperature (ht) 1>Line Graph 8, Results>Temperature (ht) 1>Line Graph 9. 4 In the Model Builder window, under Results>Temperature (ht) 1 click Line Graph 7. 2 4 In the Line Graph settings window, locate the Data section. 3 4 In the Times edit field, type 600. 4 4 Locate the Coloring and Style section. Find the Line style subsection. From the Color 5
2012 COMSOL
21 |
PHASE CHANGE
22 |
PHASE CHANGE
2012 COMSOL