An enthalpy-based finite element method for

5 downloads 0 Views 345KB Size Report
thermal phase change, they are not suitable for 'mushy ... domain X is given by the following form: ... The enthalpy function H is defined as the integral of.
Computers and Structures 80 (2002) 9–21 www.elsevier.com/locate/compstruc

An enthalpy-based finite element method for nonlinear heat problems involving phase change B. Nedjar Laboratoire Analyse des Mat eriaux et Identification, Ecole Nationale des Ponts et Chauss ees, 6 et 8, Avenue Blaise Pascal, 77455 Marne la Vall ee Cedex 2, France Received 23 April 2001; accepted 17 September 2001

Abstract Within the framework of the finite element method, we present in this paper an efficient algorithm for solving nonlinear heat problems involving phase change. In particular, two problems are considered in this work: the stationary convection–diffusion problem, and the classical transient heat problem. The mathematical models used to solve these problems are based upon enthalpy formulations. The algorithmic design is based on a Newton-type iterative procedure for the stationary problem, and for the transient one, a combination with classical finite difference schemes in time is performed. The proposed phase change algorithmic treatment is applicable for both the situations in which the latent heat takes place over a temperature range or at fixed temperature. Hence, for this latter situation, a regularization over a narrow temperature range is not necessary. The numerical implementation is discussed in detail where we include also the other possible nonlinearities, namely, the temperature dependence of the thermal conductivity and the radiationtype boundary conditions. Finally, a set of representative numerical simulations to illustrate the effectiveness of the proposed method is given. Ó 2002 Elsevier Science Ltd. All rights reserved. Keywords: Enthalpy formulation; Mushy phase change; Isothermal phase change; Stationary convection–diffusion; Transient heat problems; Finite element method

1. Introduction During recent years, much interest has been devoted to the numerical analysis of nonlinear phase change problems. The main feature of such problems is the moving interface at which the phase change occurs. This phenomenon takes place in many processes of technological interest including solidification of various forming processes, freezing problems, and applications to casting and welding industries where the knowledge of the location of liquidus and solidus temperatures is of great importance. Although in the past finite difference schemes have been traditionally employed, see for example Refs. [1, 3,25], nowadays there is increasing tendency to apply

E-mail address: [email protected] (B. Nedjar).

finite element methods because of their several advantages. Among the reasons can be the ability of the finite element method to handle complex coupled thermomechanical mechanisms with various and complex boundary conditions. The numerical approaches which have been proposed in the literature may be divided into two classes of methods: the front-tracking methods and the fixed-grid enthalpy methods. In the front-tracking methods, difficulties arise if the governing equations are based on the classical Stefan problem, i.e. a temperature-based governing equations. The discrete phase change front is tracked continuously and the latent heat release is treated as a moving boundary condition. This either requires the development of suitable techniques such as: deforming grids [21,26] or transformed co-ordinate systems [6,9] to account for the position of the phase change front. As such, these techniques could be inappropriate for engineering

0045-7949/02/$ - see front matter Ó 2002 Elsevier Science Ltd. All rights reserved. PII: S 0 0 4 5 - 7 9 4 9 ( 0 1 ) 0 0 1 6 5 - 1

10

B. Nedjar / Computers and Structures 80 (2002) 9–21

problems where the phase change may be only one component in the overall modelling work, i.e. as in metallurgical problems for example. Furthermore, although front-tracking methods are accurate for isothermal phase change, they are not suitable for ‘mushy problems’ where the phase change takes place over a temperature interval [6,8]. A more general method is the enthalpy-based method, in which the phase change front is not simultaneously tracked but derived afterward from the calculated temperatures. This is possible because the phase fronts are implicitly accounted for in the enthalpy definition within the partial differential equations, giving rise to the weak formulations. Thus fixed-domains methods, enthalpy methods, are recommended by many authors, see for example Refs. [9,13,23], largely owing to their ease of implementation in existing program packages. Also, let us mention another widely used fixed-domain method for describing phase change problems and proposed by Rolph and Bathe [20], see also Ref. [2]. In this method, an efficient heat flow accumulation technique is employed to represent the latent heat effects. The extent of the numerical difficulties is either in accurately representing the temperature history or locating the phase front, or both. For a good survey of some of the more widely advocated schemes employing finite elements, see for example Refs. [7,8,14,17,18, 20,22], and for the particular case of methods used for convection–diffusion problems, see Refs. [15,24] for example. The aim of the present contribution is to develop an enthalpy-based method for dealing with convection– diffusion phase change in as general manner as possible that can be used for both the stationary and transient problems. Recall that for the stationary convection– diffusion situation, the enthalpy function is present in the transport term and that since there is no time dependence, the accuracy of the temperature field depends critically on the algorithmic treatment. For transient problems, however, the presence of time-dependent terms regularizes more or less the problem and a straightforward resolution procedure is obtained by combining the last ideas with classical one-step h-method finite difference schemes in time. In particular, the (implicit) backward-Euler scheme is presented in this paper. Hence, and as it will be seen, there is no need to employ special schemes for transient problems, as in Refs. [7,22] for example. In this paper, the key idea in the design of the integration algorithm to deal with the phase change phenomenon is to employ a simple and efficient relaxed discretization of the enthalpy function. This discretization has been motivated by the very interesting works of Mangenes et al. [12] and Paolini et al. [19] within the context of the parabolic free boundary problems. For a good survey of the different ideas proposed by these

authors together with many theoretical results we refer to Refs. [12,19] and references therein. As a result, and independently of the nature of the considered problem (stationary or transient), it will be seen that this method is applicable for both the situations in which the phase change is mushy or isothermal. Hence, for this latter case, there is no need to employ approximation techniques to smooth the isothermal phase change avoiding then a possible deviation from the original problem. The global iterative procedures developed in this paper to resolve the nonlinear heat problems also include the treatments of the other possible nonlinearities such as the temperature dependence of the thermal conductivity and the radiation-type boundary conditions. An outline of the remainder of the paper is as follows. As a starting point, we consider in Section 2 the stationary convection–diffusion problem which is stated with an enthalpy formulation. The weak formulation is deduced and a complete algorithmic treatment is proposed. In Section 3, the latter ideas are extended for transient problems by a combination with the particular implicit backward-Euler scheme for the time discretization. Next, in Section 4, a set of numerical examples is given that show the efficiency and the robustness of the proposed method, and finally, conclusions are drawn in Section 5.

2. The stationary convection–diffusion problem 2.1. Problem statement Let us consider an open set X  R3 . The governing nonlinear stationary heat convection–diffusion equation written in terms of the enthalpy function in the moving domain X is given by the following form: V  grad H ðT Þ  div½kðT Þ grad T  ¼ Q;

in X;

ð1Þ

where divðÞ is the divergence operator, gradðÞ is the gradient operator, T ¼ T ðxÞ is the temperature field depending on the space position x 2 X, H ðT Þ is the volumetric enthalpy, kðT Þ is the thermal conductivity, Q ¼ QðxÞ is the source of internal heat generation, and V is the velocity vector of the moving domain. In Eq. (1), the thermophysical properties H and k may be highly dependent on temperature. The enthalpy function H is defined as the integral of heat capacity with respect to temperature. One has the following general form: Z T H ðT Þ ¼ qcðT Þ dT ; ð2Þ Tref

where qc is the volumetric heat capacity which depends on temperature, and where Tref is a reference tempera-

B. Nedjar / Computers and Structures 80 (2002) 9–21

11

Fig. 1. Typical enthalpy versus temperature relations: (a) mushy phase change and (b) isothermal phase change.

ture. The form of the function H ðT Þ in Eq. (2) depends highly on the material type considered in the problem. However, two cases must be distinguished: the mushy phase change, and the isothermal phase change. In one hand, for the case where the phase change takes place over a finite interval ½Ts ; T1 , the enthalpy function (2) can be equivalently given by: 8RT > < RTref qcs ðT Þ dT ; Rfor T 6 Ts ; Ts T oL qcs ðT Þ dT þ Ts q oT dT ; for Ts < T 6 Tl ; H ðT Þ ¼ T > RT : R Trefs qc ðT Þ dT þ qL þ qcl dT ; for T > Tl ; s Tref Tl ð3Þ where Ts and Tl are respectively the solidus and liquidus temperatures, and qcs and qcl are the temperatures dependent volumetric heat capacities in the solid and the liquid phases, respectively. In Eq. (3), L denotes the socalled latent heat, that is to say, qL is the energy required for a unit volume of solid at fusion temperature to be transformed into liquid. Let us note that from the physical point of view, much of the industrial applications involve alloys, rather than pure materials, which are characterized in general by enthalpy functions of the form (3). And in the other hand, for the case of isothermal phase change, the enthalpy function has a jump discontinuity at the melting temperature Tm and its dependence upon temperature may be written as, (RT qcs ðT Þ dT ; for T 6 Tm ; RT H ðT Þ ¼ RTTrefm qc ðT Þ dT þ qL þ qc dT ; for T > Tm : s l Tref Tm ð4Þ In general, for this latter case, when phase change is involved in the neighbourhood of the phase change temperature Tm , abrupt changes in H may lead to numerical difficulties requiring then a smoothing and

spreading of the phase change temperature across a temperature interval, see Refs. [5,8,16] for more comments. In this work however, no regularization is performed avoiding then a possible deviation from the original problem. Thus, the enthalpy functions considered in this paper are indifferently given by one of the forms (3) or (4). See Fig. 1 for an illustration. To solve the stationary convection–diffusion problem, Eq. (1) must be supplemented by boundary conditions. In the most general case, let foi Xgi¼14 be four complementary parts of the boundary oX of the domain X. That is, oX ¼ o1 X [ o2 X [ o3 X [ o4 X and, oi X \ oj X ¼ ; for i 6¼ j. Various boundary conditions are considered in this study: 1. A Dirichlet condition on o1 X: T ¼ T ðxÞ;

ð5Þ

on o1 X;

where T is a given imposed temperature field. 2. A Neuman condition (imposed heat flux) on o2 X: kðT Þ

oT ðxÞ ¼ qðxÞ; on

ð6Þ

on o2 X;

where n is the outward unit normal to the boundary surface, and qðxÞ a given normal heat flux. 3. A linear Fourier condition (convection boundary condition) on o3 X: kðT Þ

oT ðxÞ ¼ cðText  T ðxÞÞ; on

on o3 X;

ð7Þ

where Text is the ambient temperature and c is the convective heat transfer coefficient. 4. And a radiation-type boundary condition on o4 X: kðT Þ

oT ðxÞ ¼ aðT Þ; on

on o4 X;

ð8Þ

12

B. Nedjar / Computers and Structures 80 (2002) 9–21

where aðT Þ is a nonlinear function of temperature. For this latter, it can be given, for example, by aðT Þ ¼ 4 rðT 4  T1 Þ where r is the Stephan–Boltzman constant,  is the surface emissivity, and T1 is the temperature at infinity.

2.2. Variational formulation The variational formulation of the local form of the governing equations (1), (3)–(8) plays a central role in the numerical solution of the boundary value problem. In this section, we first develop the standard variational framework which constitutes a basis for our subsequent algorithmic treatment. Let us define the set V of tests functions w satisfying homogeneous boundary conditions on o1 X by, V ¼ fw 2 H1 ðXÞ;

w ¼ 0 on o1 Xg:

DRðT ðiÞ ; wÞDT ðiÞ ¼ RðT ðiÞ ; wÞ;

ð13Þ

until the residual RðT ðiÞ ; wÞ vanishes to within a prescribed tolerance. In Eq. (13), superscripts refer to the number of iterations, and DT ðiÞ is the temperature increment at iteration i. However, early works show that if a standard linearization of RðT ; wÞ is employed, one can expect reasonably accurate results only for sufficiently smooth variation of the heat capacity qcðT Þ with respect to the temperature, and that this leads to severe numerical difficulties when the heat capacity approaches a d-Dirac-type behaviour. For more comments on this subject, see Refs. [5,8,16,22] for example. In this paper instead, motivated by the work of Paolini et al. [12] within the context of parabolic free boundary problems, see also Ref. [12], we employ a relaxed linearization of RðT ; wÞ as described below.

ð9Þ 2.3. Relaxed linearization and resolution algorithm

To get the weak formulation, Eq. (1) is multiplied by an arbitrary test function w 2 V and integrated over the domain X. Next, use of the divergence theorem leads then to: Z Z wV  grad H ðT Þ dX þ grad w  kðT Þ grad T dX X X Z Z wQ dX þ wkðT Þ grad T  n dC; 8 w 2 V: ¼ oX

X

ð10Þ In Eq. (10), the boundary integral vanishes in the part o1 X where w ¼ 0 and also in the parts where a natural boundary condition of the type kðT Þ grad T  n ¼ 0 is given. However, one needs to evaluate it in the parts where kðT Þ grad T  n 6¼ 0. That is, by taking into account the boundary conditions (6)–(8), the weak form (10) becomes: Z RðT ; wÞ  wV  grad H ðT Þ dX X Z Z wcT dC þ grad w  kðT Þ grad T dX þ X o3 X Z waðT Þ dC  rðwÞ ¼ 0; ð11Þ 

The key idea in the design of the proposed integration algorithm to deal with the phase change proceeds in three steps. In the first step, instead of using the classical enthalpy–temperature relation (Eq. (3) or Eq. (4)), we use its reciprocal form, namely, the temperature function of enthalpy relationship. That is, we introduce a function s: H ! T given by T ¼ sðH Þ;

ð14Þ

and which, from the forms (3) and (4) (see Fig. 1), is illustrated in Fig. 2 for the mushy and isothermal phase change cases. The reason of this choice will be clear next. In the second step, the linearization of the function sðH Þ is given by T ðiþ1Þ  T ðiÞ þ DT ðiÞ ¼ sðH ðiÞ Þ þ s0 ðH ðiÞ ÞDH ðiÞ ; ðiÞ

ðiþ1Þ

ðiÞ

ð15Þ

0

where DH ¼ H  H , and where s is the derivative of s with respect to its argument. Eq. (15) is equivalently written as: DH ðiÞ ¼

1 ½DT ðiÞ þ ðT ðiÞ  sðH ðiÞ ÞÞ: s0 ðH ðiÞ Þ

ð16Þ

o4 X

where we have introduced the notation, Z Z Z wQ dX þ wq dC þ wcText dC: rðwÞ ¼ X

o2 X

ð12Þ

o3 X

Within the context of the finite element method, the numerical resolution is based on an iterative solution procedure of a discretized version of the weak form (11). Typically, this requires a linearization DRðT ; wÞ of RðT ; wÞ and, accordingly, one solves a sequence of successive linearized problems

And in the third step of the design, due to the nonconvexity of the function sðH Þ (and hence also of H ðT Þ), the incrementation (16) is relaxed as in Ref. [19] by replacing the quantity 1=s0 ðH ðiÞ Þ by a constant quantity l in all the domain and during the whole iterative process as: DH ðiÞ ¼ l½DT ðiÞ þ ðT ðiÞ  sðH ðiÞ ÞÞ:

ð17Þ

Following the theoretical results in Refs. [12,19], and references therein, the relaxation parameter l must satisfy the condition

B. Nedjar / Computers and Structures 80 (2002) 9–21

13

Fig. 2. Temperature versus enthalpy relationships: (a) mushy phase change and (b) isothermal phase change.

l6

1 ; max s0 ðH Þ

ð18Þ

0

where s ðH Þ is determined from the temperature– enthalpy relation of Fig. 2. In the numerical examples of Section 4, we always use l ¼ 1= max s0 ðH Þ. Now the reason of the choice Eq. (14) is more clear. In fact, as shown by Eq. (17), considering that H ðiÞ and T ðiÞ are known quantities from the last iteration, this permits to increment the enthalpy field with the help of the actual increment of temperature field (and not the inverse). 2.3.1. Relaxed linearization As the temperature field and the enthalpy field will be distinguished during the resolution procedure, it proves convenient to introduce this latter as an argument in the weak form (11) replacing then RðT ; wÞ by RðT ; H ; wÞ. Of course this is done having always in mind that the two arguments T and H are dependent variables. The classical linearization of RðT ; H ; wÞ is given by: Z Z wV  grad DH ðiÞ dX þ grad w  kðT ðiÞ Þ grad DT ðiÞ dX X X Z Z ðiÞ 0 þ grad w  grad T k ðT ðiÞ Þ DT ðiÞ dX þ wc DT ðiÞ dC X o3 X Z  wa0 ðT ðiÞ Þ DT ðiÞ dC ¼ RðT ðiÞ ; H ðiÞ ; wÞ; ð19Þ o4 X

where k 0 and a0 are the derivatives of k and a with respect to their arguments, respectively. Now replacing the incrementation (17) into the first term of Eq. (19) gives the e RðT ðiÞ ; H ðiÞ ; wÞ of following relaxed linearized form D RðT ðiÞ ; H ðiÞ ; wÞ: e RðT ðiÞ ; H ðiÞ ; wÞDT ðiÞ D ¼ RðT ðiÞ ; H ðiÞ ; wÞ 

Z

wlV  grad ðT ðiÞ  sðH ðiÞ ÞÞ dX;

X

ð20Þ

where e RðT ðiÞ ; H ðiÞ ; wÞDT ðiÞ D Z Z ¼ wlV  grad DT ðiÞ dX þ grad w  kðT ðiÞ Þ grad DT ðiÞ dX X X Z Z ðiÞ wc DT dC  wa0 ðT ðiÞ Þ DT ðiÞ dC: ð21Þ þ o3 X

o4 X

Note that in the expression (21), we have dropped the term with k 0 ðT ðiÞ Þ. That is, we choose in the following to treat explicitly the temperature dependence of the thermal conductivity function kðT Þ. 2.3.2. Resolution algorithm Within the context of the finite element method, the solution algorithm of the nonlinear problem at hand is deduced from the precedent developments relative to the treatment of the phase change phenomenon giving rise to the relaxed linearized weak form (20). Accordingly, each iteration of the resolution procedure is presented as a succession of two operations: one relative to the temperature field and one relative to the enthalpy field. Typically, starting from a known state T ðiÞ and H ðiÞ obtained at the last iteration i, the following steps are involved for the next iteration ði þ 1Þ: Step 1: The discretized equation (20) generates an incremental temperature field DT ðiÞ . Step 2: For the given increment DT ðiÞ , one evaluates the corresponding increment of enthalpy field DH ðiÞ obtained form the relaxed incrementation formula (17). Step 3: The temperature and enthalpy fields are updated to obtain T ðiþ1Þ and H ðiþ1Þ at the actual iteration ði þ 1Þ. Step 4: The discrete equation (20) is tested with the updated fields and, if violated, the iterative process is continued by returning to Step 1.

14

B. Nedjar / Computers and Structures 80 (2002) 9–21

Steps 1 and 4 are carried out at the global level by the finite element procedure while Step 2 is accomplished at the local level i.e. at the level of the integration points. Accordingly, the iterative process continues until the relaxed residual (second member of Eq. (20)) vanishes to within a prescribed tolerance. 2.4. Finite element approximation From the precedent developments, the unknowns of the actual finite element approximation are both the temperature and the enthalpy fields. These unknowns have different natures, and then, different regularities are required for each of them. In fact, analysing the natures of the governing equations to be approximated, the temperature has to be treated as a continuous field ðT 2 H1 ðXÞÞ, while the enthalpy has to be treated as a discontinuous one ðH 2 L2 ðXÞÞ. That means that, from the finite element point of view, the temperature unknown is required at the nodal level, while the enthalpy one is required only at the level of the quadrature points. Consider a discretization of the reference domain X into a collection S elem of finite element subdomains Xe such Xe . Using vector notation and standard that X  ne¼1 convention in finite element analysis, see Refs. [2,10,27], we write: T e ¼ T j Xe ¼ Ne T e ;

grad Te ¼ Be Te ;

ð22Þ

where Te is the vector of element nodal temperatures, Ne , the vector of element shape functions and, Be , the discrete gradient operator. Following standard procedures, substitution of the preceding interpolations into the relaxed linearized weak form (20) yields the following discrete linear equation: ðiÞ ðiÞ elem elem Ane¼1 ½kðiÞ ¼ Ane¼1 ½RðiÞ e ðTe Þ DT e  qe  ; |fflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflffl ffl} ðiÞ ¼ K ¼ SðiÞ

ð23Þ

elem ½ is the standard assembly operator over the where Ane¼1 total number of elements nelem in the discretization, DTðiÞ ¼ Tðiþ1Þ  TðiÞ is the actual global vector of temperature increments, kðiÞ e ðTe Þ are the element contribuðiÞ tions to the global tangent matrix KðiÞ , and, RðiÞ e and qe are the element contributions corresponding to the terms of the second member in Eq. (20). ðiÞ For the terms kðiÞ e ðTe Þ and qe , the element contributions associated with the element nodes are written as: Z Z T A B kðiÞAB ¼ N lV B½N  dX þ BT ½N A kðT ðiÞ ÞB½N B  dXe e e Xe Xe Z Z þ N A cN B dCe  N A a0 ðT ðiÞ ÞN B dCe ;

oXe \o3 X

oXe \o4 X

ð24Þ

and ¼ qðiÞA e

Z

N A lVT grad ðT ðiÞ  sðH ðiÞ ÞÞ dXe ;

ð25Þ

Xe

where A, B ¼ 1; . . . nenode . And for the sake of clarity, the classical term RðiÞ e corresponding to the discrete version of Eq. (11) will not be detailed here. Following the resolution procedure of Section 2.3.2, the solution of the nonlinear convection–diffusion problem with phase change is performed iteratively using the following algorithm: (a) Initialize the temperature and enthalpy fields: i ¼ 0, H ð0Þ ¼ 0, and T ð0Þ ¼ sðH ð0Þ Þ. (b) Integrate the element matrices and residuals: kðiÞ e ðiÞ form (24), qðiÞ e from Eq. (25) and Re . (c) Assemble and solve for a new temperature increment: 1

DTðiÞ ¼ KðiÞ SðiÞ : (d) Update the nodal temperatures: Tðiþ1Þ ¼ TðiÞ þ DTðiÞ : (e) Update the enthalpy field: this is performed locally at each integration point of a typical element by using the relaxed formula (17): H ðiþ1Þ ¼ H ðiÞ þ lðT ðiþ1Þ  sðH ðiÞ ÞÞ: (f) Set i

i þ 1 and go to (b).

Convergence of the preceding algorithm is attained when jjSðiÞ jj < TOL. Remark 1. For the sake of clarity, we have used in the developments of this section the standard Galerkin method. However, in the finite element implementation, we make use of the nowadays well-known Streamlineupwind/Petrov–Galerkin method, see for this Ref. [4], to avoid the eventual numerical perturbations due to the presence of the transport term in the problem. Remark 2. When implementing the precedent algorithm, particular care must be taken when calculating the term grad ðsðH ðiÞ ÞÞ present in Eq. (25). In fact, within a typical element, as the enthalpy field is stored at the integration points level, one should first interpolate this local field from the Gauss points to the element nodes before the use of the discrete gradient operator. 3. Transient nonlinear heat conduction problems In this section, we show the straightforward use of the preceding algorithmic treatment of the phase change in the case of a transient heat problem. Without loss of generality, since the treatment of the eventual presence

B. Nedjar / Computers and Structures 80 (2002) 9–21

of a convective (transport) term gives no more difficulties than for the stationary case of Section 2, it will be ignored in what follows. Then, the governing nonlinear heat conduction equation in a domain X with boundary oX is considered to be given by: oH ðT Þ  div½kðT Þ grad T  ¼ QðtÞ; ot

in X:

ð26Þ

For the resolution, this equation has to be supplemented, by boundary conditions, this time eventually time dependent, as the ones considered in Section 2, i.e. the boundary conditions (5)–(8), and also by an initial condition of the form T ðx; t ¼ 0Þ ¼ T0 ðxÞ;

ð27Þ

in X:

3.1. Variational formulation and time-stepping scheme Proceeding as in Section 2.2, the variational formulation of the initial boundary problem at hand is obtained by multiplying Eq. (26) by an arbitrary test function w 2 V (see Eq. (9)) and integrating over the domain X. Next, use of the divergence theorem and taking into account, in the most general case, the boundary conditions (6)–(8) gives then: Z Z oH ðTt Þ dX þ grad w  kðTt Þ grad Tt dX w ot X X Z Z wcTt dC  waðTt Þ dC  rt ðwÞ ¼ 0; ð28Þ þ o3 X

o4 X

where, here again, we have introduced the notation Z Z Z wQt dX þ wqt dC þ wcTextt dC: ð29Þ rt ðwÞ ¼ X

o2 X

o3 X

To resolve numerically this problem, a finite difference scheme in time has to be performed first within the time interval ½0; t under consideration in the problem at hand. In this paper, we use the implicit backward-Euler scheme as follows. Consider a typical time sub-interval ½tn ; tnþ1   ½0; t, then, starting from the known converged state ðTn ; Hn Þ at time t ¼ tn , we look for the new state ðTnþ1 ; Hnþ1 Þ at time t ¼ tnþ1 by solving the following equation: Rnþ1 ðT ; H ; wÞ Z Z Hnþ1  dX þ grad w  kðTnþ1 Þ grad Tnþ1 dX w Dt X X Z Z wcTnþ1 dC  waðTnþ1 Þ dC  rnþ1 ðwÞ þ o X o4 X Z3 Hn ð30Þ  w dX ¼ 0; Dt X where Dt ¼ tnþ1  tn . Eq. (30) is nonlinear. Then, within the context of the finite element method, its resolution is

15

based upon an iterative solution procedure of its discretized version as described below. 3.2. Relaxed linearization and resolution algorithm As for the preceding stationary problem, we use the algorithmic design of Section 2.3 to deal with the phase change. That is, use is made of the relaxed incrementation of the enthalpy field function of the actual temperature increment as (see Eq. (17)): ðiÞ

ðiÞ

ðiÞ

ðiÞ

DHnþ1 ¼ l½DTnþ1 þ ðTnþ1  sðHnþ1 ÞÞ; ðiÞ

ðiþ1Þ

ðiÞ

ðiÞ

ð31Þ ðiþ1Þ

ðiÞ

where DHnþ1 ¼ Hnþ1  Hnþ1 , DTnþ1 ¼ Tnþ1  Tnþ1 , s is the temperature–enthalpy function as shown in Fig. 2, and l is the relaxation parameter determined from Fig. 2 and which must satisfy the condition (18). In Eq. (31) and in all what follows, subscripts refer to the time step and superscripts refer to the iteration within the time step. Now proceeding as for Eq. (20), replacing the incrementation (31) into the classical linearization of Rnþ1 ðT ; H ; wÞ gives rise to the following relaxed lineaðiÞ ðiÞ e Rnþ1 ðTnþ1 rized form D ; Hnþ1 ; wÞ: ðiÞ ðiÞ ðiÞ e Rnþ1 ðTnþ1 D ; Hnþ1 ; wÞDTnþ1 ðiÞ

ðiÞ

¼ Rnþ1 ðTnþ1 ; Hnþ1 ; wÞ 

Z w X

l ðiÞ ðiÞ ðT  sðHnþ1 ÞÞ dX; Dt nþ1 ð32Þ

where ðiÞ ðiÞ ðiÞ e Rnþ1 ðTnþ1 ; Hnþ1 ; wÞDTnþ1 D Z Z l ðiÞ ðiÞ ðiÞ ¼ w DTnþ1 dX þ grad w  kðTnþ1 Þ grad DTnþ1 dX Dt X X Z Z ðiÞ ðiÞ ðiÞ wc DTnþ1 dC  wa0 ðTnþ1 Þ DTnþ1 dC: ð33Þ þ o3 X

o4 X

In expression (33) we have chosen, as in Eq. (21), to treat explicitly the temperature dependence of the thermal conductivity function. Accordingly, each iteration of the resolution procedure is presented as a succession of two operations: one relative to the temperature and one relative to the ðiÞ ðiÞ enthalpy. Starting from the known state ðTnþ1 ; Hnþ1 Þ obtained at the last iteration i, the steps involved to ðiþ1Þ ðiþ1Þ obtain the state ðTnþ1 ; Hnþ1 Þ at the next iteration ði þ 1Þ are exactly those given in Section 2.3.2 where, there, we replace Eq. (20) by Eq. (32).

3.3. Finite element approximation Here again the unknowns of the actual finite element approximation are both the temperature and the enthalpy fields. From the nature of the governing equations

16

B. Nedjar / Computers and Structures 80 (2002) 9–21

to be approximated, the temperature is required at the nodal level while the enthalpy is required at the quadrature points level. Hence, form the practical point of view, the same finite element program package is used for both the stationary convection–diffusion and the transient heat conduction problems. Considering a discretization of the reference domain X into a collection of finite elements Xe such that S elem X  ne¼1 Xe , and using the interpolations (22) into the relaxed linearized weak form (32) yields the following discrete linear equation: ðiÞ

ðiÞ

ðiÞ

ðiÞ

elem elem Ane¼1 ½knþ1e ðTe Þ DTnþ1 ¼ Ane¼1 ½Rnþ1e  qnþ1e  ; |fflfflfflfflfflfflfflfflfflfflffl ffl{zfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl} ðiÞ ðiÞ ¼ Knþ1 ¼ Snþ1

ðiÞ

ðiþ1Þ

ð34Þ

ðiÞ

where DTnþ1 ¼ Tnþ1  Tnþ1 is the actual global vector ðiÞ of temperature increments, knþ1e ðTe Þ are the element ðiÞ contributions to the global tangent matrix Knþ1 , and, ðiÞ ðiÞ Rnþ1e and qnþ1e are the element contributions corresponding to the terms of the second member in Eq. (32). ðiÞ ðiÞ For the terms knþ1e ðTe Þ and qnþ1e , the element contributions associated with the element nodes are written as: Z Z l ðiÞAB ðiÞ knþ1e ¼ N A N B dXe þ BT ½N A kðTnþ1 ÞB½N B  dXe Dt Xe Xe Z Z ðiÞ þ N A cN B dCe  N A a0 ðTnþ1 ÞN B dCe ; oXe \o3 X

oXe \o4 X

ð35Þ

and ðiÞA

qnþ1e ¼

Z Xe

NA

l ðiÞ ðiÞ ðT  sðHnþ1 ÞÞ dXe ; Dt nþ1

ð36Þ

where A, B ¼ 1; . . . nenode . Again for the sake of clarity, ðiÞ the classical term Rnþ1e corresponding to the discrete version of Eq. (30) will not be detailed here. Following the resolution procedure of Section 3.2, the solution of the nonlinear heat conduction problem with phase change is performed iteratively using the following algorithm: (a) From a converged solution at time t ¼ tn , initialize ð0Þ the temperature and enthalpy fields: i ¼ 0, Tnþ1 ¼ Tn ð0Þ and Hnþ1 ¼ Hn . ðiÞ (b) Integrate the element matrices and residuals: knþ1e ðiÞ ðiÞ form (35), qnþ1e from (36) and Rnþ1e . (c) Assemble and solve for a new temperature increment: ðiÞ

ðiÞ1

ðiþ1Þ

ðiÞ

ðiþ1Þ

ðiÞ

Hnþ1 ¼ Hnþ1 þ lðTnþ1  sðHnþ1 ÞÞ: (f) Set i i þ 1 and go to (b). Convergence of the preceding algorithm is attained ðiÞ when jjSnþ1 jj < TOL. The solution is then advanced to the next time step.

4. Numerical examples In this section we give a set numerical examples within the context of the finite element method. The first two examples are related to the stationary convection– diffusion problem developed in Section 2, and the other one is related to the nonlinear heat conduction problem of Section 3. All the algorithms developed in this paper have been implemented in an enhanced version of the C E S A R - L C P C finite element program, see Ref. [11]. 4.1. One dimensional stationary convection–diffusion The best way to show the effectiveness of the proposed phase change algorithmic treatment is to compare, when possible, the numerical responses with their corresponding analytical solutions. This is the case in this section where we consider a one dimensional problem for which (semi) analytical solutions exist for both the mushy and the isothermal phase change situations. Consider a one dimensional bar of length ‘, submitted to a constant moving velocity v and to prescribed temperatures at both ends: T0 at x ¼ 0 and T‘ at x ¼ ‘, with T0 < Ts (T0 < Tm ) and T‘ > Tl (T‘ > Tm ), as illustrated in Fig. 3. Then, the problem to be solved is given by:  vH;x ðT Þ  kT;xx ¼ 0; ð37Þ with T ðx ¼ 0Þ ¼ T0 and T ðx ¼ ‘Þ ¼ T‘ ; where, for the sake of clarity, the thermal conductivity k is taken to be constant in what follows. This problem is solved for both the mushy and the isothermal phase change situations. The following problem data are used for both the resolutions: the length of the bar ‘ ¼ 1 m, the boundary conditions T0 ¼ 200 °C and T‘ ¼ 1000 °C, the moving velocity v ¼ 104 m/s, and the thermal conductivity k ¼ 150 w/m °C.

ðiÞ

DTnþ1 ¼ Knþ1 Snþ1 : (d) Update the nodal temperatures: ðiþ1Þ

ðiÞ

ðiÞ

Tnþ1 ¼ Tnþ1 þ DTnþ1 : (e) Update the enthalpy field locally at each integration point by using the relaxed formula (31):

Fig. 3. One dimensional stationary convection–diffusion problem.

B. Nedjar / Computers and Structures 80 (2002) 9–21

4.1.1. Case 1: mushy phase change In this case, we consider an enthalpy function H ðT Þ given by (see Fig. 1(a)): 8 T 6 Ts ; < cs T ; H ðT Þ ¼ cs Ts þ csl ðT  Ts Þ; Ts 6 T 6 Tl ; : cs Ts þ csl ðTl  Ts Þ þ cl ðT  Tl Þ; T P Tl ; ð38Þ where the latent heat is given by L ¼ csl ðTl  Ts Þ. In view of the algorithmic treatment, the reciprocal form sðH Þ of H ðT Þ (see Fig. 2(a)) is then given by: 8H H 6 Hs ¼ cs Ts ; > < cs ; HHs sðH Þ ¼ Ts þ csl ; Hs 6 H 6 Hl ¼ Hs þ csl ðTl  Ts Þ; > : T þ HHl ; H P H : l l cl ð39Þ The material parameters used for the resolution that follows are: Ts ¼ 585 °C, Tl ¼ 615 °C, cs ¼ c1 ¼ 0:333  107 J/m3 °C and cs1 ¼ 8:333  107 J/m3 °C. Within the context of the finite element method, different discretizations have been employed to solve this problem. For each one, use has been made of a linear interpolation with finite elements of equal size, i.e. equal intervals in space for our one dimensional context. Fig. 4 shows the temperature profiles in the bar for the different meshes. These results are there superposed to the reference analytical solution. One can observe the good performance of the proposed numerical approximation developed in this paper

17

either for relatively coarse meshing. This is also observed for the case where the phase change is isothermal as shown below. 4.1.2. Case 2: isothermal phase change Now for the situation of an isothermal phase change, we consider an enthalpy function given by (see Fig. 1(b)):  H ðT Þ ¼

cs T ; cs Tm þ L þ cl ðT  Tm Þ;

T 6 Tm ; T P Tm ;

ð40Þ

which, in view of the algorithmic treatment, gives the following reciprocal form (see Fig. 2(b)): 8 < H =cs ; sðH Þ ¼ Tm ; : Tm þ ðH  Hs  LÞ=cl ;

H 6 Hs ¼ cs Tm ; Hs 6 H 6 Hs þ L; H P Hs þ L: ð41Þ

The material parameters used for the resolution that follows are: Tm ¼ 600 °C, cs ¼ cl ¼ 0:333  107 J/m3 °C and L ¼ 5  109 J/m3 . The numerical results are shown in Fig. 5 where, as for the last example, different discretizations have been employed to solve the problem. These results are superposed to their reference analytical solution. Here again, one can observe the good performance of the proposed numerical approximation either for relatively coarse meshing.

Fig. 4. Temperature profiles for different meshes and for the case of a mushy phase change.

18

B. Nedjar / Computers and Structures 80 (2002) 9–21

Fig. 5. Temperature profiles for different meshes and for the case of an isothermal phase change.

4.2. Laser melting process This section deals with the modelling of an application of industrial interest, namely, the laser melting process. Fig. 6 shows the mesh discretization of the domain considered in the computation together with the adopted boundary conditions. For the constitutive material in the moving domain, we choose a mushy phase change enthalpy function of the form given by Eq. (38) with the following material parameters: Ts ¼ 545 °C, Tl ¼ 555 °C, cs ¼ cl ¼ 3  106 J/m3 °C, and for the latent heat csl ¼ 8  107 J/m3 °C. And also, we consider a temperature dependent thermal conductivity function obtained by interpolating linearly the following data:

8 < 150; kðT Þ½w=m °C ¼ 132; : 110;

T 6 20 °C; T ¼ 545 °C; T P 555 °C:

ð42Þ

The numerical result is given in Fig. 7. Fig. 7(a) shows the temperature field and, in Fig. 7(b), the phase change front 545 6 T 6 555 °C is illustrated. 4.3. A transient heat conduction problem As our final example, we consider a thick cylinder with its outer surface subjected to a prescribed temperature, constant in time, T R ðtÞ ¼ T R , and its inner surface subjected to a normal heat flux qr ðtÞ, linearly increasing with time and given by qr ðtÞ ¼ 2qt. As an illustration,

Fig. 6. Laser melting process. Geometry, mesh discretization and boundary conditions.

B. Nedjar / Computers and Structures 80 (2002) 9–21

19

Fig. 7. Numerical result: (a) temperature field and (b) phase change front for T 2 ½Ts ; Tl .

Fig. 8 shows the geometry and the finite element mesh employed in the following calculations. For the constitutive material in the cylinder, we consider as in the last example, a temperature dependent thermal conductivity function obtained by linearly interpolating the data given in Eq. (42). And for the enthalpy function, we choose an isothermal phase change function of the form given by Eq. (40) with the following partial material parameters: Tm ¼ 550 °C and cs ¼ cl ¼ 3  106 J/m3 °C. This problem is solved twice for both the following values of the latent heat parameter: L ¼ 2:1  109 J/m3 and L ¼ 0. That is, the aim of these calculations is to show the effectiveness of the present phase change algorithmic treatment by noting that for the case where L ¼ 0, the heat capacity function is always constant. Figs. 9 and 10 show the phase change front at the isotherm T ¼ 550 °C and at the same time t ¼ 10 s for both the calculations. Observe that for the case where

Fig. 8. Thick cylinder: finite element mesh and prescribed boundary conditions.

L ¼ 0 (Fig. 10) this front is more advanced that for the case in which L 6¼ 0 (Fig. 9). This is because, when L 6¼ 0,

20

B. Nedjar / Computers and Structures 80 (2002) 9–21

this algorithm is applicable to both the situations in which the latent heat takes place over a temperature range (mushy phase change), and in which it takes place at a fixed temperature (isothermal phase change). And in the other hand, it has been shown how the algorithm can be used for both the stationary and the transient problems which, from the practical point of view, leads to the use of the same finite element program package. The problem of numerically integrating the resulting update equations has been given in detail. It results in an iterative solution procedure where each iteration is presented as a succession of two operations: a temperature update at the nodal level followed by an enthalpy update at the level of the integration points. Numerical examples have been given with special emphasis to the one dimensional case for which analytical solutions exist.

References Fig. 9. Phase change front at T ¼ Tm and at time t ¼ 10 s for L ¼ 2:1  109 J/m3 .

Fig. 10. Isotherm T ¼ 550 °C for L ¼ 0 at time t ¼ 10 s.

part of the heat energy is required by the solid at fusion temperature T ¼ Tm to be transformed into liquid.

5. Conclusions An efficient algorithmic treatment to deal with the phase change phenomenon has been given and investigated in this work. In one hand, it has been shown how

[1] Atthey DR. A finite difference scheme for melting problems. J Inst Maths Applics 1974;13:353–66. [2] Bathe KJ. Finite element procedures. Englewood-Cliffs, NJ: Prentice-Hall; 1996. [3] Bonacina C, Comini G, Fasano A, Primicerio M. Numerical solution for phase-change problems. Int J Heat Mass Transf 1973;16:1825–32. [4] Brooks AN, Hughes TJR. Streamline upwind/Petrov– Galerkin formulations for convective dominated flows with particular emphasis on the incompressible Navier– Stokes equations. Comput Meth Appl Mech Engng 1982;32:199–259. [5] Comini G, DelGiudice S, Lewis RW, Zienkiewicz OC. Finite element solution of non-linear heat conduction problems with special reference to phase change. Int J Numer Meth Engng 1974;8:613–24. [6] Crank J. How to deal with moving boundaries in thermal problems. In: Lewis RW, Morgan K, Zienckiewicz OC, editors. Numerical methods in heat transfer. Chichester: Wiley; 1981. p. 177–200. [7] Crivelli LA, Idelsohn SR. A temperature-based finite element solution for phase-change problems. Int J Numer Meth Engng 1986;23:99–119. [8] Dalhuijsen AJ, Segal A. Comparison of finite element techniques for solidification problems. Int J Numer Meth Engng 1986;23:1807–29. [9] Furzeland RM. A comparative study of numerical methods for moving boundary problems. J Inst Maths Applics 1980;26:411–29. [10] Hughes TJR. The finite element method. Englewood-Cliffs, NJ: Prentice-Hall; 1987. [11] Humbert P. C E S A R - L C P C un code general de calcul par elements finis. Bull Liais Labo des Ponts et Chaussees 1989;119:112–6. [12] Mangenes E, Nochetto RH, Verdi C. Energy error estimates for a linear scheme to approximate nonlinear parabolic problems. RAIRO Model Math Anal Numer 1987;21:655–78.

B. Nedjar / Computers and Structures 80 (2002) 9–21 [13] Meyer GH. The numerical solution of multidimensional Stefan problems––a survey. In: Wilson DG, Solomon AD, Boggs PT, editors. Moving boundary problems. NY: Academic Press; 1978. p. 73–89. [14] Meyer GH. Numerical methods for free boundary problems. In: Fasano A, Primicerio M, editors. Free boundary problems: Theory and applications, vol. 2. Boston: Pitman; 1983. p. 590–600. [15] Morgan K. An numerical analysis of freezing, melting with convection. Comput Meth Appl Engng 1981;28:275– 84. [16] Morgan K, Lewis RW, Zienkiewicz OC. An improved algorithm for heat conduction problems with phase change. Int J Numer Meth Engng 1978;12:1191–5. [17] Niezgodska M. Stefan-like problems. In: Fasano A, Primicerio M, editors. Free boundary problems: Theory and applications, vol. 2. Boston: Pitman; 1983. p. 321– 48. [18] Nochetto RH. Numerical methods for free boundary problems. In: Hoffman KH, Sprekels J, editors. Free boundary problems: Theory and applications. Boston: Pitman; 1988. [19] Paolini M, Sacchi G, Verdi C. Finite element approximations of singular parabolic problems. Int J Numer Meth Engng 1988;26:1007–989.

21

[20] Rolph WD, Bathe KJ. An efficient algorithm for nonlinear heat transfer with phase changes. Int J Numer Meth Engng 1982;18:119–34. [21] Rubinsky B, Gravahlo EG. A finite element method for the solution of one-dimensional phase change problems. Int J Heat Mass Transf 1981;24(12):1987–9. [22] Tamma KK, Namburu RR. Recent advances, trends and new perspectives via enthalpy-based finite element formulations for applications to solidification problems. Int J Numer Meth Engng 1990;30:803–20. [23] Tayler AB. The mathematical formulation of Stefan problems. In: Ockendon JR, Hodgkins WR, editors. Moving boundary problems in heat flow and diffusion. Oxford: Clarendon Press; 1975. p. 120–37. [24] Voller VR, Cross M, Markatos NC. An enthalpy method for convection/diffusion phase change. Int J Numer Meth Engng 1987;24:271–84. [25] White RE. A modified finite difference scheme for the Stefan problem. Math Comput 1983;41:337–47. [26] Yoo J, Rubinsky B. Numerical computation using finite elements for the moving interface in heat transfer problems with phase transformation. Num Heat Transf 1983;6: 209–22. [27] Zienkiewicz OC, Taylor RL. The finite element method, vol 1. London: McGraw-Hill; 1989.