This Page Intentionally Left Blank
ss Chemical Engineering Dept., Loughborough Umkrsity
Copyright 0 2002 by John Wiley & Sons, Ltd Ba Ens Lane, Chichester, West Sussex PO19 IUD, England National 01243 779777 Internatioiial (444) 1243 779777 e-mail (for orders and customer service enquiries),
[email protected] ww Visit our Home Page on h i ~ p ~ ~ l wwiley.co.uk or h ttp:lf~Yww.\.vile~r.com Reprmtcd August 2002 All Rights Reserved No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, scanniiig or otherwise, except under the terms of the Copyright. Desigiis and Patents Act 1988 or under the tern15 of a licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London W1P OLP, UK, without the permission in writing of the publisher. Other Wdev Edztorcal OjJcc~
John Wiley & Sons, Inc., 605 Third Avenue, New York, NU 10158-0012, USA Wiley-VCH Verlag GmbI-I, Pappehllee 3, D-69469 Weinheim, Gennany
John Wiley & Sons Australia Ltd, 33 Psrk Road, Milton, Queens1:md 4064, Australia
John Wiley 8 Sons (Asia) P k Ltd, 2 Clenienti Loop #02-01, Jm Xing Distnpark, Snrgapore 129809 John Wiley & Sons (Canada) Ltd, 22 Worccster Road, Rexdale, Ontario M9W lL1, Canada
Nassehi, Vahid. Practical aspects of finite elcmcnt modelling of polymer processing / Vahid Nassehi p. em. Includes bibliographical references. ISBN 0-471-49042-3 I. P o ~ y m e r ~ - ~ a t h e m ~ t imodels. cal 2. Chemical processes -Mathematical models. 3. Finite element inetliod. I. Title. TP1120 .N37 2001 668.9 dc21 2001045560 Lihrur-y ~
~ in P ~ ~ ~~ ~ ~~u fai ~oin ~
1
0
~
A catalogue record for this book is available from the British Library
ISBN 0 471 49042 3 Typeset in 10%Jl2%?ptTimes by Mayhew Typesetting, Rhayader, Powys Prtnled and bound in Great Britain by Antony Rowe, Cliippenharn, Wiltshire This book is printed on acid-free paper responsibly manufactured froin sustainable forestry, in which at last two trees itre planted for each one used for paper production.
~
~
This Page Intentionally Left Blank
1
1.1 Governiiig Equations of Non-Newtonian Fluid Mechanjcs 1.1.1 Continuity equation I , 1.2 Equation of inotion 1 .1.3 Thermal energy equatioii I .1.4 Constilutive equations
i T i ~ e - ~ n d e p e n ~Fluids e~lt L .2 ~ l a s s i ~ c ~ t iofo iInelastic 1.2.1 Newtonian fluids 1.22 Geiieralized Newtonian fluids
1.3 ~ ~ c~ ~~ r ~n cs ~ ~~ Fluids ~i ~~~ e n d c ~ ~ ~ 1.4 Viscoelastic Fluids 1.4.1 Model (material) paramcters used in viscoelastic constitutive equations 1.4.2 Diffcreiitial constitutive equations for viscoelaqtic fluids 1.4.3 Singlc-integral constitutive equatioizs for viscoelastlc fluids 1.4.4 Viscometric approach - the (CEF) model
eferences
2 2 2 3 3 4 4 5 8
9 9 11 13 14
15
7 10
2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9
Intei-polation models Shape functions of commonly used Gnite elemeiits Non-standard elements Local coordinate systems Order of continuity of finite elements Coiivergence Irregular and curved elements - isoparanietric mapping Numcrical integration Mesh refinement - b- and p-versions of the finite element method
20 23 27 29 32 33 34 38 40
viii
CONTENTS
Numerical Solution of Differential Equations by the esidual Method 2.1 Weighted residual statements in the context of finite element discretizatioiis 1.2.2 The standard Galerkin method 2.2.2* Galerkin finite element procedure - a worked example 2.2.3 Streamline upwind Petrov-@derkin n~etliod 2.2.3* Application of upwiiiding - 2% worked example 2.2.4 Least-squares finite elemciit method 2.2.5 Solution oC time-dependent problems eferences
2.2
41
42 43 44 53 54 64 64 68
3 7
3.1
3.2
3.3 3.4
Solution o f the Equatioiis of Continuity and Motion 3.1.1 The U-V P scheiiie 3.1.2 The U-V-P scheme based on the slightly compressible continuity equation 3.1.3 Penalty schemes 3.1.4 Calculation of pressure in the penalty schemes - variational recovery method 3.1.5 Application of Green’s theorem - weak Corniulations 3.1.6 Least-squares scheme Modelling of Viscoelastic Flow 3.2.1 Outline of a decoupled scheme for the differential constitutive models Dcrivatiorz of the wwkipg equations 3.2.2 Finite element schemes for the integral coristitutive models 3.22 Non-isothernial vlscoelastic Row Solution of the Energy Equation Imposition of Boundary Conditions in Polymer
71 72
Models
93 93
3.4. I
3.5
3.4.2 3.4.3 Free 3.5.1
3.5.2 3.5.3 eferences
Velocity and surface force (stress) components i n k t eonditiom Lirw of symnletrj’ Solid walls Exit conditions Slip-wall boundary conditions Temperature and thermal stresses (teniperature gradients) SurCace and Moving Boundary Problems VOF method in ‘Eulerian’ frameworks VOF method in ‘Arbitrary Lagiangian--Ei~lerian’ frameworks VOF method in ‘Lagrangian’ frameworks
74 75 77 77 79 79
81 83 86 89 90
95
96 96 97 98 99 t01 101 102 1 04
I08
CONTENTS
ix
111 4.1
Modelling of Steady State Stokes Flow of a Generalized Newtonian Fluid 4.1.1 Goverriing equations in two-dimensional Cartesian coordinate systems 4.1.2 Governing equations in two-dimensional polar coordinate systems 4.1.3 Governing equations in axisyimnetric coordinate systeins 4.1.4 Working equations of the U -V- P scheme in Cartesian coordinate systems 4.1.5 Working equations of the U-V-P scheme in polar coordinate systems 4.1.6 Working equations of the U -V-P scheme in axisytnxnetric coordinate systeins 4.1.7 Working equations of the continuous penalty scheme in Cartesian coordinate sys tems 4 1.8 Working equations of the continuous penalty scheme in polar coordinate systems 4.1.9 Working equations of the continuous penalty scheme in axisyinmctric coordinate $ystGms 4.1.10 Working equations of the discrete penalty scheme in Cartesiaii coordinate systems 4.1.11 Working equations of the least-squares scheme in Cartesiaii coordinate systemv
4.2 4.3
4.4
Variations of Viscosity Modelling of Steady-State Viscometric Flow - Working Equations of the Continuous Penalty Scheme in Cartesian Coordinate Systems ~ o d e l l i n gof Thermal Energy 4.4.1 Working equations of thc e upwind @U) scheme for the steady-state energy equation iii Cartesian, polar and axisymmetric coordinate systems 4.4.2 Least-squares and streamline upwind Petrov-Galerkin (SUPG) schemes odelling o f Transient Stokes Flow of Generalized Newtonian
and Non-Newtonian Fluids cferences
5.1
111 111 112 113 114
116 117 118 120 121 123 125 126
127 128
129 131 132 139
Models Based on Simplified Domain Geomctry
141
5.1.1 ~ ~ d e l l ofi ~the g dispersion stage in partially filled batch internal mixers Flow simulation in a .single blade partially filled mixer Flow simulation iri a portrali-vjifrlled twin blade mixer
142 142 146
x
CONTENTS
5.2
Models Based oil Simplified Governing Equations 5.2.1 Sirnitlation of the Couette flow of silicon rubber - gencralized
150
Newtoiiian model Siinulation of the Gouette flow of silicon rubber - viscoelastic
151
inodd
152
5.2.2
epresenting Selected Segments of a Large 156 5.3. I
Prediction of stress overshoot in the contracting sections of a r)inunetric flow domain 5.3.2 Simulation o I slip in a rubber mixer
5.4
Models Based on oupled Flow quations the Flow Inside a Cone-and-Plate
-
156 158
Simulation of
5.4.1 Goveining equations 5.4.2 Finite element discretization of the governing equations
ased on ‘Thin Layer A ~ ~ r o x i m ~ t i o ~ ite element rnodelling of flow distribution in an extrusion die 5.5.2 Generalization of the Hele-Shaw approach to flow in thin curved layers Asymptotic expansion sclwtne
iiffiiess Analysis of Solid Polymeric 5.6.1 Stiffness analysis o f polymer composites filled with spherical particlcs
eferences
160 162 166 170 113 175 117 183 184 188
1
6.1
Gencral Considerations Generation
elated to Finite Element
rocessor Progmms
191 192 193 193 194 195 196
6.3.1 Direct solution methods Pivoting ~ ~ ~ ¶ ~elimimtion , ~ i a n with pnrtiul pivoting Nutnbc.~.OJ operictions in the Gimsiun eEiwzirzation method
199 200 200 20 1 202
6.1.1
Mesh types Block-ctructured g i k h Ovrrsrf grid5 Hybrid grids 6.1.2 Conmiou methods of mesh generation
6.2 6.3
6.4
ain Components of Finite ELem Lrmerical Solution o f the Global Equations
~ ~ l ~ ~a lt ~i oor ni t h based ~s on the Caussian e l i r n i ~ ~ ~ i o n method 6.4.1 LU dccomposition technique 6.4.2 Frontal solutioil tzchniquc
203 203 205
CONTENTS
6.5 Computational Errors 6.5.1 Round-off error 6.5.2 Iterative improvement o f the solution of systems of linear equations
References
xi 206 206
207 207
2 209 210 213 21 5 217 220 150
8.1 8.2
Vector Algebra Some Vector Calculus 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5
Divergence (Gauss’) theorcm Stokes theorem Reynolds transport thcorein Covariant and conlravanant vectors Second order tensors
8.3 Tensor Algebra 8.3.1
8.4
Invariants of a second-order tensor ( T )
Some Tensor Calculus 8.4.1 Covariant, contravariant and mixed tensora 8.4.2 The leiigth o f a linc and metric tensor
253 255 256 257 257 258 258 255) 26 I 262 262 263 7
9
This Page Intentionally Left Blank
~ o ~ p u t a t i ~o u~ i~dday~n a ~ i c sis a major investigative tool in the design and analysis of complex flow processes eiicountered in moderii iiidustrial operations. At the core of every computational analysis is a iiurnerical method that determines its accuracy, reliabil~ty,speed and cost effectiveness. The finite element method, originally developed by structural engineers for the numerical modelling o f solid mechanical problems, l ~ i been s eslablislied as a powerful technique that provides these require~entsin the solution of fluid flow and beat transfer problems. The most significant characteristic of this technique is its geometrical flexibility. Therefore, it is regarded as the method of choice in the analysis of problems posed in g e o ~ ~ t r ~ ~complex d l l y domains. For this reason the ana~ysis olymer processing flow regimes is often based on the finite element
~ ~ d u s t r ipolymer al processing encompasses a wide range of operat~onssuch as extrusion, coating, mixing, moulding, etc. a multiplicity o f materials carried out under various operating conditions. design arid o r g ~ n i ~ a t i oofn each process should therefore be based on il detailed quantit~tiveanalysis of its specific features and conditions. The common - and probably the most portajority of these analyses is, however, the s i ~ ~ ~ l aoft ~a ononn wtonian fluid deformation and flow p tion o f non-isothermal, noii-Newtonia with the f o i ~ u ~ a t ~ofo na matheniat~calmodel consisting of the g o v e ~ i ~ l i g e q i i ~ t ~ oarising ~ s , from the laws of conservation of mass, energy, inomenturn icli describe the constitutive behaviour of the fluid, together ropriate boundary conditions. The f o r m ~ i ~ ~ it ~ e da t h e ~ ~ a t ~ c a l ed via a computer based nuiiierical lechnique. Therefore, the mputer models for n ~ n - ~ e w t oflow ~ i ~regi~ies a~ in polymer t i - d i ~ c ~ ~ l i itask i ~ r yin which iiumeri ~ a lana~y~is, ~omput~r programming, fluid mechanics and rlieology each form ail i ortaiit part. It is evident that these subjects cannot be covered in a single te and an in-depth description of each area requires separate volumes. It is not, however, realistic m n e that before embarking on a project in the area of computer m yrner ~rocess~ng one should acquire a thorough thesrctical kilo all of these subjects. ~ i i d e ethe ~ norrrial time period allowed for conip~et~oii of
xiv
PREFACE
postgraduate research studies or industrial projects precludes such an ambitious requirement. The utilization of commercially available finite element packages in the s~mulationo f routine operations in industrial polymer processing is well established. However, these packages camot be usually used as general research tools. Thus flexible ‘in-house’aeated progranis are needed to carry out the analysis required in the investigation, design and development of novel equipment and operations. This book is directed towards postgraduate students and practising ei~~ineers who wish to develop finite element codes for non-Newtonian flow problems arising in polymer processing operations. The main goal has been to enable the reader to come to speed in a relatively short time. ~i~evitably, in-depth discussions about the fundamental aspects of non-Newtonian fluid mechanics and i n ~ t h e ~ a t i cbackground a~ of the finite element method have been avoided. nstead, the focus of the text is to provide the ‘parts and tools’ required for a s s e ~ b ~~i n~ igt element e models which have applicabi~ityin s i t u ~ t ~ oexpected ns to arise under realistic conditions. The illustrative examples that are iiicluded in the book have been selected carefully to give a wide-ranging view of the application of the described finite element schemes to industrial problems. The finite element program listed in the last chapter can be used to model n o n ~ i s o t h e ~ ~steady-state al generalized Newtonian flow in two-dimensioiial planar domains. The code solves Iaminar incompressible Navier-Stokes equations for a power law fluid. The program is written using a clcar and simple sty1 and does not include any special features and hence can be readily compile most Fortran compilers. The basic code given in this program may be extended to solve more complex polymer processing problems using the finite e~eiiientschemes derived in the book (Chapter 4). An illustrative example that shows the extension of the code to axisyinmetric flow problems is discussed in the text and the required modifications are highlighte~on the program listing. i
Computer modelling provides powerf'ul and conveiiient tools for the quantitative analysis of Auid dynamics and heat transfer in n o n - ~ e w t o ~ ~polymer ian flow systems. Therefore these ~echniquesare routinely used in the modern polymer industry to design and develop better and more efficient process equ~pmentand operations. The main steps in the development of a c o ~ i ~ u t e r model for a physical process, such as the flow aiid defoiination of polymeric materials, can be sunimarized as: formulation of a sct o f governing equations which in conjunction with appropriate initial and boundary conditions provide a ~ i a t h e n ~ ~ t imodel cal for the process. and solution o€ the foriiiu~atedmodel by a computer based~nL~fne~ca1 scheme.
liidustrial scale polymer forming operations are usually based on the combination of various types of i~ dividua~ processes. Therefore in the c o ~ ~ L ~ t e r - ~ i d e d design of these operations a section-by-section approach can be adopted, in which each section of a larger process is modelled separately. An i ~ e q ~ i ~ ~ nini ethis n t approach is the imposition of realistic boundary c at the limits of the sub-sections of a complicated process. The division of a complex operation into simpler sections should therefore be based on a systematic procedure that can provide the necessary boundary conditions at the ~imits of its sub-processes. A rational method for the identification of the subs of polymer forming operations is ~ e s c r ~ b eby d Non-Newtcmian flow processes play a key role in many types of polymer en~~iieeriiig operations. Hence, f ~ ~ ~ l a to if ~o i~a it h e i ~ dmodels ~ ~ c ~ for l these processes can be based on the equatio~isof n o n - ~ e w t o n i ~fluid ~ n mechanics. The general equations of ~ o n - ~ ~ w fluid ~ o mechanics n i ~ ~ provide expressions in terms of velocity, pressure, stress, rate of strain and t ~ ~ ~ c r a tin~ 1a -flow e d o n ~ ~ These ~ n . equations are ~erivedon the basis of physical laws and
2
THE BASIC EQLJATIONS OF NON-NEWTONIAN FI,UTD MECHANICS
rheological experiments. ecause of the predominant role of non-Newtonian flow equations in the modelliiig of polymer processes it is important to understand the theoretical foundations of these equations. However, detailed explanation of the theoretical foundations of non-Newtonian fluid meclianics is outside the scope of the present book. The subject is covered in many textbooks devoted to the topic. For example, the reader can find detailed derivations of the basic cquatiovis of non-Newtonian fluid mechanics in Bird et a/. (1960) and Aris (1989) and more specifically for polymeric fluids in ~ i d d l e m ~ n ird et ul. (1977). In this chapter the general equations of laminar, non-Newtonian, noni s o t h e ~ ~inco~pressib~e al~ flow, commonly used to model polymer processing operations, are presented. Throughout this chapter, for the simplicity o f presentation, vector notations are used and all of the equations are given in a h e d ( s t a t i o ~ ~ or ~ r yEulerian) coordinate system.
The conti~iuityequation is the expression of the law of con~erv~tion of mass. This equation is written as
where '7 is the operator nabla (gradient opcrator) and v is the velocity vector. quation (1.1) is also callcd the in~ompressibilityconstraint. The absence of a pressure temi in the above equation is a source of diffkulty in tbe nttnierical simulation of incompressible flows.
The equation of motion is based on the law of' conservation of inomenturn ~ ~ e w ~ osecond n ' s law o f motion). This equation i s written as
where p is fluid density, v is selocity, is the Cauchy stress tensor and g i s the r i cregimes the convection body force per unit volume of fluid. ~ o ~ y ~ eflow (1.2) is usually small and can e neglected. Tfiis is a eynolds number (creepiiig or okes) flow of highly
GOVERNING EQUATIONS OF NON-NEWTONIAN FLUID MECHANICS
3
viscous fluids. In the majority of polymer flow systems the body force in comparison to stress is very small and can also be omitted from the equation of motion. The Cauchy stress tensor is given as = -p6
+z
(1.3)
where p is hydrostatic pressure, 6 is unit second-order tensor (Kronecker delta) and z is the extra stress tensor. The equation of motion is hence written as
(1.4)
This equation is the expression of the conservation of theiinal energy (first law of thermodynamics) and i s written as T = kV2T+ Dt
(1.5)
pc --
where I' is specific heat, k is thermal conductivity, T is temperature aiid V2 is the scalar ~aplaciaii.The terms on the right-hand side of Equation (1.5) represent heat flux due to conduction, viscous heat dissipation and a heat source (e.g, heat generated by chemical reactions etc.), respectively. Thermal energy changes related to the variations of fluid density are neglected in this equation. processes iiivolving solidi~cationor melting of polymers, the specific heat varies substantially with temperature and it should be retained inside the material derivative in Equation (1.5). Thermal conductivity of polymers is also likely to be t e ~ p e r a t ~ dependent re and anisotropic and, ideally, should be treated as a variable in the derivation of the energy equation. In practice, however, the lack of ~xperimentaldata usually prevents the use of a variable k in polymer flow models.
the e
s
A c o n s t i t ~ ~ ~equation ve i s a relation between the extra stress (7)and the rate of deformation that a fluid experiences as it flows. Therefore, theoretically, the constitutive equation of a fluid characterises its macroscopic d e f o r ~ a t ~ o ~ behaviour under different flow conditions. It is reasonable to assume that the macroscopic bcliaviour of a fluid mainly depends on its microscopic structure. owever, it is e x t r e ~ e ~difficult, y if not i ~ p o s s i b ~to e .establish exact q u a ~ i t i ~ ~ t i v e
relationships between the microscopic structure of non-Newtonian fluids and their macroscopic properties. Therefore the derivation of universally applicable const~tL~t ive models for non-Wewtonian fluids is, in general, not attempted. Instead, semi-empirical relationships which give a reasonable prediction for the behaviour of specified classes of non-Newtonian fluids under given flow con~itionsare uscd. Depending on their constitutive behaviour, polymeric liquids are classified as: ti~e-in~ependent inelastic, tii~e-~ependent inelastic, or vi~coe~astic
In an i~~elastic, time-independent (Stokesian) fluid the extra stress is considered to be a function of the instantaneous rate of defornnatioii (rate o f strain). ~ ~ l i e ~ e fin o rthis e case the fluid does not retain any memory of tlic history of tlie defor~ationwhich it has expericnced at previous stages of the flow.
In the s i ~ p l e scase t of Newtoniaii fluids (linear Stokesian uids) the extra stress tensor is expressed, using a constant Auid viscosity p, as
is the rate of deformation (rate of strain) tensor re~~esenting the s y r n ~ ~ ~part r i c of the velocity gradient tensor. C o ~ ~ o n e of ~ tthe s rate of ion tensor are hence given in terms of the velocity ~ r a d i ~ as n~s
) and (1.7) are used to formulate explicit relationships between extra stress c o ~ p o n e n t and s the velocity gradients. Using these r e l a t i o ~ ~ h ~ ~ s the extra stress, T,can be eliininated from the governi~i~ e q u a ~ i ~ ~This n s . is the basis for the derivation of the well-known Navbvier- Stokes equations which re wtonian flow (Aris, 1989).
CLASSIFICA~IONOF INELASTIC T ~ M E - I N ~ E ~ ’ E NFLUIDS ~~Nr
5
Common expcrime~italevidence shows that the viscosity of polymers varies as they flow. Under certain conditions however, elastic effects in a polymeric flow can be neglected. In these situations the extra stress is again expressed, e~pli~itly’ in terms of the rate of deformation as
where q is the apparent viscosity, which is a function of the ~agiiitudeof the rate of deforination tensor and teniperatL~re.Equation (1.8) is said to provide a neralized Newtonian’ description of the fluid behaviour. Analogous to connt viscosity Newtoiiian flow, this equation is used to derive the ‘generalized N ~ v i e r - ~ t o ~ equations es’ via the substitution of the ex stress in the equation of motion in terms of viscosity and velocity gradients. nce, the only requirement for the solution of these equations i s the determination of the appare~~t fluid viscosity. Theoretically the apparent viscosity of generalized Newtonian fluids can be found using a simple shear flow (i.e. steady state, one-d~~en$ional, constant shear stress). The rate of defor~atlolitensor in a simple shear flow is given as
+
where i s a scalar called the shear rate. Consequently in this case an experimental flow curve which relates the shear stress to the shear rate (called a rlic~gram)can be used to calculate the fluid viscosity as
where ‘12 i s the shear stress. Tn practice, it is very difficult to establish a simple shear flow and instead ‘viscometric’ regimes are used to determin~p a r a ~ e t e r s such as viscosity. In a viscometric flow, a fluid elenieiit deformation observed in a frame of reference which translates and rotates with that*element, will be identical to a siinple shear system. In addition l o the apparent viscosity two other material parameters can be obtained using simple shear flow viscometry. These are primary and secondary normal stress coefficients expressed. respectively. as @I2
and
=
7-11
-
7-22
r2
(11.11)
THE BhSlC EQUATIONS OF NON-NEWTONlAN FLUID MECHANICS ?1123 = 7-22 - 7-33
i’2
(1.12)
Material parameters defined by Equations (1.11) and (1.12) arise from anisotropy (i.e. direction dependency) of the m~crostructureof long-chain polymers subjected to high shear deformations. Generalized Newtonian constitutive equations cannot predict any normal stress acting along the direction perpendicular to the shearing surface in a viscometric flow. Thus tlie primary and secondary normal stress coefficients are only used in conjunction with viscoelastic constitutive models. utnerous examples of polymer flow models based on generalized N e w t ~ ~ i ~ d n behaviour are found in non-Newtonian fluid mechanics literature. Using experimental evidence the tiinc-independent generalized Newtonian fluids are divided into three groups. These are Bingha rn plastics, p s e ~ i ~ o p ~ afluids s t ~ c and dilatant fluids.
ingharn plastics ingham plastics are fluids which remain rigid under the application of shear stresses less than a yield stress, rJ1b like a simple Newtonian fluid once d shear exceeds this value. of fluids were developed (1947) and Casson (1959).
uids have no yield stress threshold and in these fluids the ratio of shear stress to the rate of shear generally falls coii~ii~uo~sly and rapidly with increase in tlie shear rate. Very low and very high shear regions are the excep, where the flow curve is almost ~ o r ~ z 0(Figure ~ t ~ l 1.1). c o m m ~ nclioice of functional rclatioiishi~between shear viscosity and rate, that usually gives a good prediction for the sliear doplastic pluicls, i s the power Law model proposed by de wald (1925). This model i s written as the ~ollo~/iiig equat (1.13)
where the pa~ameters,qo and n, are called the consistency coefficient and the power law index, respectively, It is clear that a uid with power law index of unity will be a pureIy Newtonian fluid. It is also corninonly accepted that the nonew~0nianbehaviour of fluids become more pronounced as their correspondiiig
CLASSIFICATION OF TNE1,ASTIC T T M ~ - l N D E P FLUIDS E ~ ~ ~ ~ ~7 ~
i---+--
. .............................
Shear rate i, (s-9
~~~1~~
1.1 Shear thinning behaviour of pseudoplastic fluids
power law index shows greater departure from unity. The consisteixy coef~cient is fluid viscosity at zero shear and it has a higher value for more viscous fluids. A modi~edversion of the power law inodel which can represent very low shear regions has also been proposed ( ~ i d d ~ e ~1977). a n , Hn some cascs it may be more realistic to apply a segmented form of this model in which different values of the p a r a ~ e t e r sover different ranges of the shear rate are used. The f o l l o ~ n g tem~crat~~re-dependent form of the power law equation, based on the forinula for thermal effccts, is the niost frequently used version o f this p o l ~ ~flow i e ~niodcls ( ittrnan and Nakazawa, 1984)
where h is called the temperature dependency coefficient and T,..t is a referenc~ n addition to the power law inodel a plethora of other relasenting the constitutive behaviour of pseudoplastic fluids can also be found in the literature. For example, the f ~ ~ ~ o wequation iii~ by Carreau (1968) has gained wides~~ead application in polymer prQ~essing analysis
(1.15)
where r/o and vx, are zero and infinite shear rate 'constant viscosities', respectively, X is a material time constant and y2 is the power law index.
THE BASIC EQUATIONS OF N 0 ~ " ~ E ~ T O ~FI,IJII) I A NM
~
~
~
~
N
l
~
Shear stress T~~(Pa)
Pseudoplastic
I-----
~~~~~
1.2 Comparison of the rheological behaviour of Newtoriian arid typical gencralized Ncwtoaian fluids
ilatant fluids (also known as shear thickening fluids) show an increase in viscosity with an increase in shear rate. Such art increase in viscosity may, or may not, be acco easurable charige in the volume of the fluid wer law-type rheological equa~iollswith y1 > 1 are usually used to model this type of fluids. Typical rheograins representing the behaviour of various types of geiier~lize~ ~ ~ w t o n i afluids n are shown in Figure 1.2.
Under the application of a steady rate of shear, the viscosity of some types of n ~ n ~ ~ e wfluids t o ~changes ~ ~ nwith time. ~ i i ~ e - d e ~ e n dfluids, e n t which show an increase in viscosity as time passes, are called 'rheopectic'. Fluids showing the opposite effect of decreasing viscosity are called 'thixotropic'. thixo~ropyare complex phenomena resulting from transient changes of the molecular structure of time-dependent fluids under an applied shear stress. In general, it i s extremely difficult to introduce molecular effects of this kind into the con~titutiveequations of non-~ewtonianfluids. Thus the proposed constitutive models for these fluids are based on inany simplifying assumptions (Slibar IJaslay, 1959). In cases where the elastic effects shown by a t i ~ e - ~ e p c n d e n t are negligible then, basically, a mathemdtical model similar to the generalThe constitutiv4: ized Newtoniaii fluids can be used to represent their fl dency of the fluid equation in such a model must, however, reflect the time d ~
S
ViSCOELASl'IC PL U iDS
viscosity. The construction of flow models for time-dependent fluids often requires the use of kinetical relations. These relations represent molecular nomenon such as polymer degradation as a fhction o f time ( ~ e m b ~ o w s l ~ i etera, 1981).
Apart from the prediction of a variable viscosity, generalized N e w t ~ n i con~i~~ stitutive models cannot explain other phenomena such as recoil, stress relaxation, stress overshoot and extrudate swell wliich are commonly observed in polymer processing flows. These effects have a significant impact on the product quality in polymer processing and they should not be ignored. ~ ~ c o r e t i ~ all all~, of* these phenomena can be considered as the result of the material having a Combination of the properties of elastic solids and viscous fluids. ~ ~ t h e n i a t i cmodelling a~ of polymer processing flows should, ideally. be based on the use of viscoelastic constitutive equatioiis. Formulation of the constitutive equations for viscoelastic fluid s been the subject of a considerable amou~itof research over many decades. ails of the derivation of the viscoelastic constitutive equations and their tion are covered in many textbo review papers (see Tanner, d rt al., 1977; it soul is, 1990). these efforts and the prolifer oposed viscoelastic constitut~vee in recent years, the problem of selecting one wliich can yield v a fluid under all types of flow conditions i s still wiresolved practice, therefore, the reinaini~igoption is to choose a constitutive viscoelastic model that can predi the most dominant features of the fluid behaviour for a given flow situatio~i. should also be mentioned here that the use of a com~ u t a ~ i ~ ~ ncostly a l l y and complex viscoelastic model in situations that are different from those assumed in the formulation of that model will in general yield unreli~~ble ~ r e d i c t i ~ nand s should be avoided.
atcrial paraiiiete~§,such as relaxation time, elongational viscosity and normal ess coefficients, are essentially used as coiivenieiil means of ~ ~ t ~ o d L i c various aspects of viscoelastic fluid behaviour into a constitutive e ~ ~ ~ aThe ~ i o ~ exact d e ~ n ~ ~ of i o these n parameters under general conditions i s ~ i ~ ~and c u i ~ hence they are regarded as empirical parameters in viscoelastic models. These parameters can, ever, be regarded as compatible with ~ / c l l - ~ ~ ~ fphysical ined f~nctionsunder le flow conditions. Thus, analogous to the fluid viscosity in ~ e w t ~ ~flows, ~ ~ athei imaterial ammeters in a viscoelastic rnodel are found via rheonietr~ce~perir~ents conducted using simple flow regimes.
THE BASIC EQUATIONS OF NON-NEWTONIAN FL,UID MECHANLCS
tress rclaxation time, obtained from rheograms based on viscometric flows, i s used to define a dimensionless parameter called the ‘ eborah number’, which
quantifies the elastic character of a fluid
(1.16) where A is the relaxation time (characteristic of polymer chains relaxation) and 0 is an appropriate duration of the deformation time. The magnitude of the Deborah number is used as a measure for deciding whether viscoelastic effects in a certain flow problem are significant or not. An alternative definition based on the dimensioiiless ‘Weissenberg number’ is also used to provide a quantitative measure for viscoelasticity of non-Newtonian fluids ( ~ i ~ ~ ~1977). ~ e ~ Thea n , eissenberg number is defined as
w,
=;
x-Y H
(1.17)
where Y and N are the characteristic process velocity arid process length, respectively. The rate of ~ e f o ~ ~ a t itensor o i i in a pure e~ongationalflow has the fol~ow~ng form
(1.18)
where P is a positive scalar called the principal extension rate. ~longa~ional Wow the elongational viscosity o f a fluid is defined as (1.19) where 7-11 and 5-22 are the normal stress co~poiients.In practice, it i s very difficult to set up a controlled, pure elongationd flow and the measurement of the elo~gationalviscosity of fluids is not a trivial matter. For a ~ e ~ ~ t o n fluid i~ii the e ~ ~ i i ~ a t i o viscosity nal is three times the value of ,U ( ~ t e v e n ~1972). o ~ ~ In ~ vjscoelastic fluids the ratio of elongational viscosity to shear viscosity can be much higher than three. The elongation viscosity defined by Equation (1.19) represents a uni-axial extension. Elongational flows based on biaxial extensions can also be considered. In an equi-biaxial extension the rate of d e f ~ ~ ~ t itensor o I i is defined as
1
VlSCOELAS’TlC FLUIDS
(I 20)
where iA i s a positive scalar called the biaxial elongation rate. The biaxial viscosity is defined as TB = 711 - 7-33 - 7-22
gr3
- r33
(1.21)
ependiiig on the method of analysis, constitutive models of viscoelastic fluids can be formulated as differential or integral equations. In the differential models stress components, and their niaterial derivatives, arc related to the rate of strain components and their material derivatives. Idroyd-type differential constitutive equations for incompressible viscoelastic fluids can in general can be written as (Oldroyd, 1950)
(1.22) d A are material parameters and the time derivative (A,,h,c
(1 2.3)
is the unit tensor, = $[ov+(ov)~‘I and CI) = &[OV -(vv)~ 1 are the symmetric and antisymmetric parts of the velocity gradient tensor. Equation (1.23) gives the most general definition of a time derivative of any second-order tensor and it contains the local, convective, rotational and strain related changes of the tensor with respect to the time variable. In practice special cases are considered. The Jaumann or co-rotational time derivative is defined as a case where the parameters (1, b and c are zero. the upper-convected (or codeforrnationali) Oldroyd derivative, a = -1 a 0 and c are zero. The lowcrdroyd derivative is defined using a = + I and b and c as zeros. ell class of viscoelastic constitutive equations are described by a in which 12 = 0. For example, the upper-
THE BASIC EQUATIONS OF NON-NEWTONIAN FLUID MECHANICS
+A-
A-,ooz = At 2rl
ther combinations of upper- and lower-convected time derivatives of the stress tensor are also used to construct constitutive equations for viscoelastic fluids. For example, Johnson and Segalman ( I 977) have proposed the following equation (1.25)
where -,c is a parameter between 0 and 2. A frequently used example of Oldroyd-type constitutive equations is the model. The Oldroyd- model can be t~oL~ght of as a des the ~ o ~ i s t i t u behavio ~~ve of a fluid made by tlie dissolution of a (UC a Newtonian ‘solvent’. ere, the parameter 11, called the ‘retardati defined as A X (risl(q + qs), wlie rls is the viscosity o f t solvent. Hence thc model is made up of axwell and solvent extra stress tensor in the (41 itutive equation i s writteii as contri~utions.The Oldroyd (1.24) axwell or Oldroyd models do not give realistic ~redictionsof the flow and deformation behaviour of poly ric fluids. In particular, in cases w h ~ r ethe €low regime is cliara~terized e l o n g a t ~ o ndefoi~atioiis ~~ these models are found to give very poor predictions, There luve been many attempts to derive constitutive models that incorporate both shear and ~ ~ o n g a ~ i o i i a l b e ~ a v i ~ uofr viscoelastic fluids. ~han-Thieriand Tanner (1 977) ~ o ~ . ~ u al ~ ~ c astic model based on the network theory for macromolecules. This model 11 shown to give relatively good results for elon~ationalflows (Tanner, haIi-~hieii~Taniier equation is expressed as (1.27)
ii where E: i s defined as a characteristic elongational parameter. In ~ ~ u a t i o(1.27) ammeters E and c (0 5 c 5 2) are representative of the elongatio~aland ~eliavioL~r of the fluid, respectively. As it can be seen the insertion of E = 0 han-~liien/Tannerequation to the ~ o l i i i s o ~ ~ e gna ~l ~o d ~ en ~ ~ All of the described differential viscoelastic coiistitutive equations are implicit relations between the extra stress and the rate of deformation tensors. Therefore, unlike the generalized Newtoniaii flows, these equations cannot be used to eliminate the extra stress in the equation of motion and should be solved ‘sii~ultaiieous~y’ with the governing flow equations.
VISCOELASTIG FLIJIDS
13
In integral niodels, stress c o ~ p o n e n t sare obtained by i~itegratinga p p r o ~ r ~ ~ t e functions, representing the amount of deformation, ovcr the strain history of the h i d . The simplest integral constitutive model for r~ibber-like fluids was proposed by Lodge (1964). ther equations, belonging to this category of by Jolinson and Segalman (1977) and stitutive models, have been dev er, the most frequently used singleand Edwards (1978, 1979). integral constitutive model for viscoelastic fluids is the K in~epeiidentlyproposed by aye (1962) and ernstein, Kearsley aiid Zapas (1963). The generic form of the integral constitutive equations for isotropic fluids i s written as t
M(t - t’){@l(llJ2)[
ere z(t) is the stress at a fluid particle given by an integral of d e f o ~ ~ a t i o ~ i istory along the fluid particle trajectory between a deformed configuration at time t’ and the current reference time 1 . In Equation (128) f~inctionM(t - t’) is the tinie-dependent niemory f u n ~ t ~ o n and Q2 and are the funcof linear viscoelasticity, non-dimensional scalars tions of the first invariant of the ( t t‘), which arc, rcspectiv~~y, (called the Finger strain tensor) right Gauchy Green tensor itsoulis, 1990). The memory fUiictioa is usually expressed as (1.29)
where ,riA(lc = 1, n) are the viscosity coefficients and Xk(k = I , n) are the relaxation times. The general Equation (1 28) can be used to derive various single-iii~e~~ai viscoelastic constitutive models for incompress~b~e fluids, For example, by setting Q, = 1 and @, = 0 the model developed by Lodge (196 derived. This model can be shown to be equivalent to the up~~er-coi~v axwell equation described in the previous section. To obtain the the scalar fixnclions in the strain-dependent kernel of the integral in ~ q u a t i o n (1.28) are chosen as
(1.30) where 11 and tr( ) and W(I,, 12)is a potential for functions and (15., As it can ial case of the K in which W = 1,. modcl proposed has found widespread application in the modelling o f viscoelastic flows lley and Coates, 1997).
THE BASIC EQLJATIONS OF NON-NEWTONIAN FLUID MECHANICS
Integral models have the apparent advantage of giving the extra stress tensor exp~~citly and thercfore they can be used to find the stress in a separate step to other field unknowns. owever, the integral models are mathematically difficult to handle and, in general, should be solved in Eagrangian frameworks. The high ~ o ~ p u t ~ t i ocosts n a t of adaptive meshing required in Lagrangian systems and problems arising from the calculation of functions which are dependent on in history are regarded as the set backs for these models. ome of the integral or differential constitutive equations presented in this revious section have an exact equivalent in the other group. There are, however, equations in both groups that have no equivalent in the other category.
The practical and computational complications encountered in obtaining solutions for the described differential or integral viscoelastic equations sometimes justifies using a heuristic approach based on an equation proposed by Criminale, Ericksen and Filbey (1958) to model polymer flows. Siniilar to the geiieralized Newtonian approach, under steady-state viscornetric flow conditions cornponents o f the extra stress in the (CEF) model are given as explicit relationships in terms of the components of the rate of deformation tensor. However, in the model stress components are 'corrected' to take into account the influence of normal stresses in non-Newtonian flow behaviour. For example, in a two-dii~ensionalplanar coordinate system the components of extra stress in the (CEF) niodel are written as (1.31) where D,, etc. are the components of the rate of deformation (strain) tensor and %!12 and 9 2 3 are the primary and secondary normal stress coefficients, respectively. An analogous set of relationships which reflect eloiigational behaviour of polymeric liquids has also been proposed ( itsoulis, 1990) as
where 71, and qs are elongational and shear viscosity, respectively. low computational costs of using the (CEF) model, this approach has been advocated as an attractive alternative to more complex viscoelastic equations in that do not significantly deviate from the iiiodelling of poly v i s c ~ ~ e t rcondition ic
REFERENCES
1
REFERENCES ., 1989. Vectors, Tensors arid the Basic Equations
if
Fluid Mechanics, Dover
. and Zapas, LA.>1963. A study of stress relaxation with finite
strain. Tram, Soc. RReoI. 7, 391-410. , a., 1977. Dynamics of Polymeric Fluidsq Vol. Bird, R.B., Armstrong, 1 . Fluid ~ ~ ~ e c h a n i c s ~ ., 1960. Tvanspovt Phenomena. Wiley, New York. Casson, N., 1959. In: Mill. C. G . (ed.), Rheology of Disperse Systems, Pergamon Londo11. Carreau, P. J., 1968. PhD thesis, Department of Chemical Engineering, University of Wisconsin, Wisconsin. Criminale, W. 0. Jr, Ericksen, J. L. and Filby, 6.L. Jr., 1958. Steady shear flow of nonNewtoiiiaii fluids. Arch. Rat. Mech. Anal. 1, 410-417. de Wade, A., 1923. See Bird, R.B., Armstrong, R. C. and Hassager, 0. 1977. Dynamics of Polymeric Fluids, Yol. I : Fluid Mechanics, Wiley, New York. M. and Edwards, S.F., 1978. Dynamics of concentrated polymer systems: 1. rowniaii motion in equilibrium state, 2. Molecular motion under flow, 3. Constitutive equation and 4. Rheological properties. J. Ckmz. Soc., Faraday Tvans. 2 7 1802, 1818-1832. . and Edwards, S. I:.. 1979. Dynamics of concentrated polymer systenis: 1. Brownian motion in equilibrium state, 2. Molecular molioii under flow, 3 , Constitutive equalion and 4. Rheological properties. J. Chem. Soc., Faraday Tmns. 2 7 38 -54. . and Bulkley, R..1927. See Rudraiah, N. and Kaloni, P.N, 1990. Flow of non-Newtonian fluids. In: Encyclopaedia OJ Fhid Mechanics, Vol. 9, Chapter 1,
n, D., 1977. A model for viscoelastic fluid behaviour which l ~Uccli.2, 255- 270. allows non-affiiie deformation. J. Non-Ntwtoniu Raye, A., 1962. ~ o ~ - ~ e ~ Flow ~ t ~in) Irzcompr ~ ~ i ~ r i Fluids, CoA Note No. 134,
College of Aeronautics, Cranfield. Keiiiblowslti, Z. and Petera, J.. 1981. Memory effects during the flow of thixotropic fluids in pipes. Rheol. Acfa 20, 31 1-323. Lodge, A. S., 1964. Elastic Liqiiids, Academic Press, London. iour or concentrated dilatant susvier Processing, McGraw-Hill, New York. Mitsoulis, E., 1986. The nun1 ger fluids: a viscometric approxiiiiation approach. Polym. itsoulis, E., 1990. Nunieri oelastic Fluids. In: Encyclopueidiu of Fluid Mechanics, Vol. 9, Chapter 21, Gulf Publishers, Houston. Oldroyd, J. G., 1947. A ratioiial formulati of the equations of plastic flow for a Bingliam solid. Yroc. Cumb. Philos. ,%c. ." 1950. On the formulation of rheological equations oC state. Pro(, Roy.
THE BASIC bQUATIONS OF NON-NEWTQNIAN FLUID MECHANICS
Olley, P. and Coates, P. D., 1997. An approximation to the Ic. KZ conskitutive equation. J. A l o r z - ~ e ~ ~ ~Fluid t o n ~Mech. f~~ ~ s t ~ aW., l ~2925. , See Bird, R.B., h i s t r o n g , R. C. and Hassager, 0. 1977. Dynnmics of Polynierir FluidJ, Vol. 1: Fkid Mechanics, Wiley, Ncw York. earson, J. R. A., 1994. Report on University of Wales Institute of Won-Newtonian echanics Mini Symposium on Continuum and Mi Coinputational Rheology. J. Non-Nt.wtoniuw Fluid M d z . Phan-Thien, N. and Tanncr, R.T.,1977. A new constituti network ttieory. .I. ~on-Ne~vtoniun Fluid Mech. 2, 353-365. ittcnan, J. F. ‘r.and Nakazawa, S., 1984. Finite element analysis of polymer processing ations. In: Pittman, J. F. T., Zienkiewicz, 0 ,C., Wood, R. D. and Alexander, . (eds), Niimericul Apm1pi.s of Forming Prnressm, Wiley, Chichester. Slibar, A. and Paslay. P. R., 1959. Retarded flow of’ Bingham inaterialli. T r a m ASME 26, 107-113. Stevenson, J. F., 1972. Elongational flow of polymer melts. AIChE. J . L Tadrnor, Z. and Gogos, C. G., 1979. Priuc@les of Polymer Prucemin,o, Wiley, New York. Tanner, R. I., 1985. Engineering Rheology, Clarendon Press, Oxford. Wagner. M.N., 1979. Towards a network theory for polymer melts. Rlzeol. A c ~ a .18, 33 50.
As described in Chapter 1, mathematical models that represent polymer flow systems are, in general, based on non-linear partial differential equatioiis and cannol be solved by aiialytical techniques. Therefore, in general, these equations are solved using numerical methods. Nuiiierical solutions of the ~ ~ i f f e r e i ~ t i a ~ equations arising in engineeriiig problems are usually based oii finite difference, finite element, boundary element or finite volume schemes. Other nuinerical techniques such as the spectral expansions or newly emerged mesh inde~eiident metliods may also be used to solve governing equations of specific types of e i i ~ ~ i e eproblems, ~ i i ~ Numerous examples of the successful ap~licatioriof these methods in the computer modelling o f realistic field problems can be found in the literature. All of these methods have strengths aiid weaknesses and a number of factors should be considered before deciding in favour of the applicatio~of a particular method to the modelling of a process. The most important factors in this respect, are: type of the governing equations of the process, geometry of the process domain, nature of the boundary conditions, required accuracy of the calculations and compLitatioiia~cost. In general, the finite element method has a greater geoi~etriea~ f l ~ x i b i ~tb~li it~ other currently available numerical tecliniques. It can also cope very e~fect~vely with various types of boundary conditions. The most significant setback for this method i s the high coniputational cost of three-dimens~onalfinite el models. In practice, rational a p p ~ o x i ~ a t i o nare s often used to obtain simulations for realjstic problems without f i l l three-dimensional aiialysis. In the nite element modelling of polymeric flows the following a p ~ r o a c hcan ~ ~be adopted to achieve c o n i ~ ueconomy: ~i~~~
‘rwo-dimensioiialmodels can be used to provide effective a ~ ~ p r o x i n ~ a in ~~ons the modelling of polyiiier processes if the flow field variations in the remaining (third) direction are sinall. In particular, in a x i s ~ n m ~ t rdoina~ns ic it may be possible to ignore the c i ~ c u ~ f ~ r e variations i l ~ ~ A ~ of the field u~i~~now and n s analytically integrate the flow equations iri that directio reduce the n u ~ e r ~ cmodel al to a t w o - ~ i ~ e n s i o nform. al
WEIGHTED RESIDXJAL FINITE ELEMENT METHODS - AN OUTLINE
Process characteristics may justify the use OC simplifying assumptions such as the ‘lubrication approximation’ which may be applied to represent creeping flow in narrow gaps. Components of the governing equations of the process can be decoupled to develop a solution scheme for a three-din~eiisioiialproblem by combining one- and two-dimensional analyses. Examples of polymeric flow models where the above simp~i~cations have been successfully used are presented in Chapter 5. Finite elenient modelling of engineering processes can be based on different inet~o~o~o~ For i e sexample, . the preferred method in structural analyses is the i is placement method’ which is based on the minimization of a variational statei~entthat represents the state of equilibrium in a structure ( and Taylor, 1994). Engineering fluid flow processes, on the other hand, cannot be usually expressed in ternis of variational principles. Therefore, the mathematical ~ o d ~ ~ l iof i i flnid g dynamical problems is mainly depeiident on the solution of partial differential equations derived from the laws of conservation of inass, momentum and energy and constitutive equations. Weighted residual methods, such as the Galerkin, least square and collocation techniques provide theoretical basis for the numerical solution of partial differential equations. owever, the direct application of these techniques to engine~~ing problems usually not practical and they need to be combined with finite clement oximatioii procedures to develop robust practical schemes. oiily adopted approach in computer modelliiig of flow processes in polymer engiiieeri~igoperati oiis is the application of weighted residual finite elenient methods. The main concepts of the finite element a p p r o x ~ ~ a t ~and o n the general outline of the weighted residual methods are briefly explained in this chapter. These concepts provide the necessary background for the development of tbe w o ~ ~equations i i ~ ~ of the iiuinerical schemes used In the s ~ ~ u l a t i oofn polymer processing operations. In-depth analyses of the mathematical theorems underpinning finite element approximations and weighted residual methods arc outside the scope of this book. The re, in this chapter, mainly descriptive outlines of these topics are given. ailed explanations of the theoretical aspects of the solution of partial rential equations by the weighted residual finite element methods can be found in many textbooks dedicated to these subjects, FOP.example, see Mitchell and Wait (1977), Johnsoiz (1987), renncr and Scott (1994) and, specifically, for the solution of incompress~ble Navier-Stokes equations see Girault and Raviart ( 1986) and Pironneau a t h e ~ ~ t i c derivations al presented in the following sections are, occasionally, given in the context of one- or two-di~ie~sional Cartesian coordiii~~te systems. These derivations can, however, be readily generalized and the adopted style is to make the explanations as simple as possible.
FINITE ELEMENT APPROXIMATION
19
The first step in the formulation of a finite element approximation for a field problem is to divide the problem domain into a number of smaller sub-regions without leaving any gaps or overlappiiig between them. This process is called ‘Domain Discrctization’. An individual sub-region in a discretized domain is called a ‘finite element’ and collectively, the finite elements providc a ‘finite element mesh’ for the discretized domain. In general, the elements in a finite eleinent mesh inay have different sizes but all of them usually have a common basic shape (e.g. they are all triangular or quadrilateral) and an equal number oC nodes. The nodes are the sampling points in an element where the numerical values o f the ~ i n k n o ~ are n s to be calculated. All types of finite elements should have some nodes located on their boundary lines. Some of the commonly used finite elements also have interior nodes. Boundary nodes of the individual finite eleinents appear as the junction points between the elements in a finite elemcnt mesh. In the finite element modelling of flow processes the elements in the cornputational mesh are geometrical sub-regions of the flow domain and they do not represent parts o f the body of the fluid. In most engineering problems the boundary of the problem domain includes curved sections. The discretization of domains with curved boundaries using meshes that consist of elements with straight sides inevilably involves some error. This type of discretization error can obviously be reduced by mesh owever, in general, it cannot be entirely eliminated unless finite elements which themselves have curved sides are used. The discretization of a problem domain into a finite element mesh consisting of randomly sized triangular elements is shown in Figure 2.1. In the coarse mesh shown there are relatively largc gaps between the actual domain boundary and the boundary of the mesh and hence the overall discretization error is expected to be large. The main consequence of the discretization of a problem domain into finitc elements is that within each element, unknown functions can be approximated using inter~olationprocedures. Y
X
~i~~~ 2.1 Problem domain discretization
WElGHTED RESIDUAL FINITE ELEMENT METHODS
-
AN OUTLINE
be a well-defined finite element, i.e. its shape, size and the iiuniber and locations of its nodes are known. We seek to define the variations o f a real valued continuous function, such as f, over this element in terms of appropriate geometrical functions. I f it can be assumed that the values o f f on the nodes of Qe are known, then in any other point within this element we can find an approximate value for j’using an interpolation method. For example, consider a one-dimensional two-node (linear) element of length E with its nodes located at points A(x* = 0) and B(XB= I ) as is shown in Figure 2.2. ( ,
A(xA== 0)
B(XB =
I)
Figure 2.2 A one-dimensional linear element
Using a simple interpolation procedure variations of a continuous function such as f along the element can be shown, approximately, as
-
.fx
t-x = -“-,fA
x
7.h
Equation (2.1) provides an approxiinate interpolated value for f a t position x in t e r m o f its nodal values and two geometrical functions. The geometrical [unctions in ~ q u a t i Q(2.1) n are called the ‘shape’ functions. A simple inspection shows that: (a) each function is equal to 1 at its associated node and is 0 at the other node, and (b) the sum of the shape functions is equal to I . These fun~tioiis,shown in Figure 2.3, are written according to their associated nodes as NA and Wu. 1
0 A
B X
~~~~r~ 2.3 Linear Lagrange interpolation functions
FINITE ELEMENT APPROXIMAL‘ION
21
Analogous interpolation procedures involving higher numbers of samplling points than the two ends used in the above example provide higher-order approximations for unknown functions over one-dimensional elements. The method can also he extended to two- and three-dimensional elements. In general, an inte~olatedfunction over a multi-dimensional element expressed as P I-:
1
where (.%Irepresents the coordinates of the point in SZ, on which we wish to find an approxiiiiate (interpolated) value for the function5 i is tlie node index, p is the total number of nodes in 52, and Nl(X) is the shape function associated with imilar to the one-dimensional example the shape functions in multi~ ~ ~ e n s i o elements iial should also satisfy the following conditions
(2.3) where j r , i = 1, . . .p are tlie nodal values of the function j’ (called the nodal degrees of freedom). Nodal degrees of freedom appearing in elemental interpolations (i.e. fi, i = 1,. . . p ) are the field unknowns that will be found during the finite element solution procedure. The general form of the shape functions associated with a finite element depends on its shape and the number of its nodes. In most types of commonly used finite elements these functions are low degree polynomials. In general, if the degrees of freedom in a finite element are all given as nodal values of unknown functions (i.e. function derivatives are excluded) then the element is said to belong to the Lagrange family of ele~ents. However, some authors use the term ‘Lagrange element’ exclusively for those elements whose associated shape functions are specifically based on ~ a g r a n g e interpolation polynomials or their products (Gerald and ~ h e a t ~ e 1984). y, Hermite interpolation models involving the derivatives of field variables (Ciarlet, 1978; Lapidus and Pinder, 1982) can also be used to construct function a ~ p r o x i ~ a t i o nover s finite elements. Consider a two-node one-dimensional element, as is shown in Figure 2.4, in which the degrees of freedom are nodal values and slopes of unknown functions. Therefore the expression defining the approximate value of a function f a t a point in the interior of this element should include both its nodal values and slopes. Let this be written as
22
WEIGHTED RESIDUAL FINITE ELEMENT METHODS
-
AN OUTLINE
X
Figure 2.4 A one-dimensional Werniite element
where N&) and Nll(x) are polynomial expansions of equal order. As it can be seen in this case each node is associated with two shape functions. At the ends of the Line element Equation (2.4) must give the function values and slopes shown in Figure 2.4, therefore: NOI(X) must be 1 at node number I and 0 at the other node, Nb,(x)must be 0 at both nodes, and
Nlr(x) must be 0 at both nodes and N i f (x) must be 1 at node I and 0 at the other node.
A simple inspection shows that cubic functions (splines) shown graphically in Figure 2.5 satisfy the above conditions.
igure 2.5 One-dimensional Herniite interpolation functions
Inherent in the development of approximations by the described interpolation models is to assign polynomial variations for function expansions over finite elements. Therefore the shape functions in a given finite element correspond to a
FINITE ELEMENT APPROXIMATION
particular approximating polynomial. owever, finite element approximations may not represent complete polynomials of any given degree.
2. Standard procedures for the derivation of the shape functions of cominon types of finite elements can be illustrated in the context of two-dimensional triangular and rectangular elements. Let us, first, consider a triangular element having three nodes located at its vertices as is shown in Figure 2.6.
Figure 2.6 A linear trimgular element
Variations of a continuous function over this element can be represented by a complete first-order (linear) polytiomial as
By the insertion of the nodal coordinates into Equation (2.5) nodal values o f f can be found. This is shown as
where xE,y,, i = 1,3 are the nodal coordinates andj; i = 3,3 are the nodal degrees of freedoin (Le. function values). Using matrix notation Equation (2.6) is written as
WEIGHTED RESIDUAL FINITE ELEMENT METHODS - AN OUTLINE
hence
-
I
e
(2.8)
Equation (2.5) can be written as
(2.9) ornparing Equations (2.2) and (2.9) we have
f=Np
(2.10)
where N is the set of shape functions written as (2.1 1)
In the outlined procedure the derivation of the shape functions of a threenoded (linear) triangular element requires the solution o f a set of algebraic equations, generally shown as Equation (2.7). hape functions of the described triangular element are hence found on the basis of Equation (2.1 1) as (2.12) (2.13) (2.14)
can be readily shown that these geometric functions satisfy the condilions seribed by Equation (2.3). Shape functions of a quadratic triangular element, with six associated nodes located at its vertices and mid-sides, can be derived by a similar procedure using a complete second order polynomial. Similarly it cm be shown that a complete cubic polynomial corresponds to a triangular el t with 10 nodes and so on. The ar~angernentshown in Figure 2.7 (called 1 cal triangle) represents the teiins required to construct coinplete polynomials of any given degree, p , in two v~~riables x and y . The number of terms of a complete polynoniiai o f any given degree will hence correspond to the number of nodes in a triangular element belonging to this family. An analogous tetrahedral family of finite elements that correspo~dsto complete polynomials in terms of three spatial variables can also be constructed for three-diinensional analysis.
FINITE ELEMENT A ~ ~ ~ ( ~ X l M A 25 ~ ~ O N
p=o
1
x 2 xy
x3 x*y xy2
x4 x3y
p=2
y2
p=3
y3
x y xy3
y4
p”4
.............................................................................................................
.......................... lire 2.7 Pascal triangle
The described direct derivation of shape functions by the formulation and solution of algebraic equations in terms of nodal coordinates and nodal degrees of freedom i s tedious and becomes impractical for higher-order elenients. Furthermore, the existence of a solution for these equations (i.e. existence o f an inverse for the coefficients matrix in them) is only guaranteed if the elemental interpolations are based on complete polynomials. Important families of useful finite elements do not provide interpolation models that correspond to complete polynomial expansions. Therefore, in practice, indirect methods are employed to derive the shape functions associated with the elements that belong to these faniilies. A very convenient ‘indirect’ procedure for the derivation of shape functions in rectangular elements is to use the ‘tensor products’ of one-dimensional interpolation functions. This can be readily explained considering the four-node rectangular element shown in Figure 2.8.
e 2.8 Bi-linear rectangular element
The interpolation model in this element i s expressed as
7= + azx 4- q y -ta4xy U1
(2.15)
26
WEIGHTED RESIDUAL FINITE ELEMENT METHODS
-
AN OXJTLINE
The polynomial expansion used in this equation does not include all or the terms of a complete quadratic expansioii (i.e. six terms corresponding to p = 2 in the Pascal triangle) and, therefore, the four-node rectaiigular element shown in igure 2.8 is not a quadratic element. The right-hand side of Equation (2.15) can, however, be written as the product of two first-order polynomials in tenns of x and y variables as
.r = (htx + b2) (b3.y -tb4) *
(2.16)
Therelore an obvious procedure for the generation of the shape functions of the element shown in Figure 2.8 is to obtain the products of linear interpolation functions in the x and y directions. The four-noded rectangular element constructed in this way is called a bi-linear element. Higher order members of this family are also readily generated using the tensor products of higher order one-dimcnsional interpolation functions. For example, the second member of this group is the nine-noded bi-quadratic rectangular element, shown in T'g '1 ure 2.9, whose shape functions are formulated as the products of quadratic Lagrange polynomials in the x and y directions. A similar procedure is used to generate 'tensor-product' three-dimensional elements, such as the 27-node tri-quadratic element. The shape functions in twoor three-dimensional tensor product elements are always incomplele polynomials.
Figure 2.9 Bi-quadratic rectangular element
nalogous to tensor product Lagrange elements, tensor produc ents can also be generated. The rectangular element developed by ul. (1965) is an example of this group. This element is shown in Figure 2.10 and involves a total of 16 degrees of freedom per single variable. The associated shape functions of this element are found as the tensor products of the cubic polynomkals in x and y (see Figure 2.5).
FINITE ELEMENT APFROXIMATION
27
Another important group of finite elements whose shape functions are not complete polynomials i s the ‘serendipity’ family. An eight-noded rectangular element which has four corner nodes and four mid-side nodes is an exampje of this family. Shape fuiictiorls of serendipity elenients cannot be generated by the tensor product of one-dimensional Lagrange interpolation functions (except for the four-node rectangular element which is the same in both families). these functions are found by an alternative method based on using products of selected ~ o ~ y ~ o m ithat a l s give desired function variations on element edges (Reddy, 1993). Y
I
* x
~ i ~ M 2.10 ~ eA rectangular Hermite eleinent
ts Finite element families described in the previous section are used to obtain standard discretizatioiis in a wide range of different engineering problems. In addition to these families, other eleineiit groups that provide specific types of approximations have also been developed. In this section a number of ‘iionstandard’ elements that are widely used to model polymeric flow regimes are ood elements are among the earliest examples of this group designed for the solution of incoinpressible flow problems. elements interpolation of pressure is always based on a lower-order polynomial than the polynomials used to interpol~tevelocity components (Taylor and Hood, 1973). The rectangular element, shown in Figure 2.1 1, is an example of this family.
WEIGHTED RESIDUAL FINITE ELEMENT METHODS - A N OUTLINE
Y
~ i g 2.1~1 1~ Nine e node Taylor-Wood element
In this element the velocity and pressure fields are approximated using biquadratic and bi-hear shape functions, respectively, allis corresponds to a total of 22 degrees of freedom consisting of 18 nodal velocity c o ~ ~ p ~ ~ i(corner, ents mid-side and cciitre nodes) and four nodal pressures (corner nodes). Croweix-Raviart elements are another group of finite elements that provide different interpolations for pressure and velocity in a flow domain (Grouaeix aviart, 1973). The main characteristic of these clenients is to make the e on the element bouiidarics discontinuous. For example, the cornbinalion of quadratic shape f~nctionsfor the o x ~ ~ n ~ of t ~ vo~n~ o c i t(correy sponding to a six-node triangle) with a const essure, (given at a single node inside the triangle), can be considered. Another ieinber of this family is the rectangular element shown in Figure 2.12, in which the a ~ ~ ~ o x i ~QEa t i ~ velocity is based on bi-quadratic shape functions while pressure i s approximated linearly using three internal sampl g nodes. This element usually provides a greater ~ e x ~ b i than ~ ~ t the y Taylor- ood element, shown in Figure 2.11, in the modelling of incompressible flom7 problems.
Pressure
MR
2.12 An element be1
FINITE ELEMENT A P P ~ ~ X I ~ A ~ I O 2 N
The global Cartesian framework used so far is not a convenient coordinate system for the generation of functioii approximations over different elements in a mesh. Elemental shape functions defined in t e r m of global nodal coordinates will not remain invariant and instead will appear as polynomials of similar degree having different coefficicnts at each element. This inconvenient situation is readily avoided by using an ap~ropriatelocal coordinate system to define elemental shape functions. If required, interpolated functions expressed in terms of local coordinates can be transformed to the global coordinate system at a later stage. Shape functions written in terms of local variables will always be the same for a particular finite element no matter what type of global coordinate system is used. Finite element approximation of unknown f u i i ~ t i ~ in n sterms of locally defined shape functions can be written as
where x* represents local coordinates andf; are nodal degrees of freedom. shown in Figure 2.13 a local Celrtesian coordinate system with its origin located at the centre of the element is the natural choice for rectangular e ~ e ~ e n t s ~ rl
3 Local coordinate system in rectangular elements
Using this coordinate system the shape functions for the first two ~ e ~ b eofr s the tensor p r ~ d u c ~t a g r a ~ eg lee ~ i e family ~t are expressed as Four-node bi-linear element
30
WELGHTED RESIDUAL FINITE ELEMENT METHODS - AN OUTLINE
Nine-node bi-quadratic element
3
1 6
(2.19)
2
the local Cartesian coordiiiate system used in rectangular elements its not a suitable choice for triangular elements. A natural local coordinate system fur the triangular elements can be developed using area coordinates. Consider a triangular element as is shown in Figure 2.14 divided into three suh-areas of A I , A2 and AR.The area coordinates of L,, Lz and L3 for the point B inside this triangle are defined as A1
=A
L1
Az A A3 L3 = A
(2.20)
L2 = -
3
A, is the total area of the triangle. 1:;
1
1
X
Area coordinates in triangular elements
FINITE ELEMENT ~ ~ ~ O X l ~ A T l31( ~ N
It can be readily shown that L,,i = 1,3 satisfy the requirements for shape functions (as stated in Equation 2.3) associated with the triangular element. The arca of a triangle in terms of the Cartesian coordinates of its vertices is written as
(2.21) Therefore the area coordinates defiacd by Equation (2.20) in a global Cartesian coordinate system are expressed as
(2.22)
Therefore
(2.23)
The expansion of Equation (2.23) gives the transformation between thc local arca coordinates and the global Cartesiaii system (x, y ) for t ~ i a n ~elements. ~ar This transforrnation also coilfirms that in a global Cartesian coordiiiate system the shape functions o f a linear triangular element should be exprcssed as ~ q ~ a t (2.121, i o ~ (2.13) ~ and (2.14). Using the area coordinates the shape Eiinctions for the first two meinbcrs or the triangular finite elements are given as Three-node linear triangular elcrneiit 3
1
2
32
WEIGHTED RESIDLJAL FINITE ELEMENT METHODS
-
AN OUTLINE
Six-node quadratic triangular element
(2.25)
.5 A general requirement in most finite element discretizations is to maintain the compatibility of field variables {or functions) across the boundaries of the neig~ibouringelements. Finite elements that generate uniquely defined function approxiinations along their sides (boundaries) satisfy this condition. For example, in a mesh consisting of three-node triangular elements with nodes at its vertices, linear interpolation used to derive the element shape functions gives a unique variation for functions along each side of the element. Therefore, field variables or functions on the nodes o f this element are uniquely defined. This example can be contrasted with a three node triangular element in which the nodes (i.e. sampling points for interpolation) are located at inid-points of the triangle, as is shown in Figure 2.15. Clearly it will not be possible to obtain unique linear variations for functions along the sides of the triangular element shown in the figure.
2
.I5 A iiodal arrangement that cannot provide inter-elemcnt compatibility of functions
Finite elements that maintain inter-element compatibility o f functions are ‘ e o n f ~ r ~elements’. i~g Finite elemeiits that do not have this property are d to as the ‘non-conforming elements’. Under certain conditions nonconforming elements can lead to accurate solutions and are inore advantageous to use. The order of continuity of a conforming finite element that only ensures the c o ~ ~ ~ ~ i of b ifunctions ~ i t y across its bouildaries is said to be Co. Finite eleme~i~s that ensure the inter-element compatibility of functions and their derivatives gher order of continuity than Co. For example, the gure 2.4 which guarantees the ~ o ~ p a t i b i l i of t y function values and
FINITE ELEMENT AP~ROX~MATION 33
slopes at its ends is C' continuous. According to this definition, the nonconfo~i~ triangular g element shown in Figure 2.15 is said to be a C continuous element. The order of continuity and the degree of highest order complete polynomial obtainable in an elemental interpolation are used to identify various finite elements. For example, the three-node linear triangle, shown in Figure 2.6, and the four-node bi-linear rectangie, shown in Figure 2.8, are both rercrred to as P'C* elements. Similarly, according to this convention, the nine-node biquadratic rectangle, shown in Figure 2.9, is said to be a P2Cuelement and so on.
'
All numerical computations incvitably involve round-off errors. This error increases as the number o f calculations in the solution procedure is incre~ised. Therefore, in practice, successive mesh refinenieiits that increase the number of finite element calculations do not necessarily lead to more accurate solutions. However, one may assume a theoretical situation where the rounding error is eliminated. Hn this case successive reduction in size of elements in the mesh should improve the accuracy of the finite element solution. Therefore, using a P G n element with sufficient orders of interpolation and continuity, at the Jirnit (Le. when element d~~iiens~ons tend to zcro), an exact solution should be obtained. This has been shown to be true for h e a r elliptic problems (Strang and Fix, 1973) where an optimal convergence is achieved if the following coiid~~io~is are satisfied: e r a ~ should be small, aspect ratio of ~ u a d r ~ ~ a telements internal angles of elements should not be near 0 " or 180", the exact soliition should be sufficiently smooth and must not include si~igular~t~es, robleni domain should be convex, and elemental calculations (i.e. evaluation of integrals etc.) inust be s u f ~ c i ~ ~ i t l y accurate. and Theoretical analysis of convergence in non-linear probleins i s ~nco~iplete in most instalices does not yield clear results. Conclusioiis drawn from the analyses of linear elliptic problems, however, provide basic guidelines for solving n o n ~ l i n ~ or a r non-e~lipticequations.
WEIGHTED RESIDUAL FINITE ELEMENT METHODS - AN OUTLINE
~lexibilityto cope with irregular domain geometry in a straightforward and systematic manner is one of the most important characteristics of the finite element method. Irregular domains that do not include any curved boundary sections can be accurately discretized using triangular elements. In most engineering processes, however, the elimination of discretization error requires the use of finite elements which themselves have curved sides. It is obvious that randomly shaped curved elements cannot be developed in an ad hoc manner and a general approach that is applicable in all situations must be sought. The required generali~ationis obtained usiiig a two step procedure as follows: a regular element called the ‘master element’ is selected and a local finite element approximation based on the shape functioiis of this element is established, and the master element is mapped into the global coordinates to generate the required distorted elements.
A graphical rep~esentationof this process is shown in Figure 2.16. Y
E
X
iwe 2.16 Mapping between a master element and elements in il global mesh
In the figure operation (M) represents a one-to-one t ~ ~ i i s f o r i ~ abetween t i ~ n the local and global coordinate systems. This in general can be shown as
(2.26) The one-to-one transformation between the global and local coordinate systems can be established using a variety of techniques ( ~ i e n k i e ~ 7 iand c~
FINITE ELEMENT APPROXIMA rZON
35
1983). The most general method is a form of ‘parametric mapping’ in which the transformation functions, x(&q) and y((,q) in Equation (2.261, are polynoi~ials based on the element shape functions. Three different forms of this technique have been developed: Subparametric transformations: shape functions used in the mapping functions are lower-order polynomials than the shape functions used to obtain finite element approximation of functions. upe~arametrictransformations: shape fimctions used in the map functions are higher-order polynomials than the shape functions used to obtain finite clement approximation of functions. Isoparametric transformations: shape functions used in the mapping functions are identical lo the shape functions used to obtain finite element a p p r o x i ~ a ~ i oofn functions. is the most commonly used form of the described para~ s o ~ a r ~ m e tmapping ric metric t r a ~ i s f o ~ a t i o Figurc n. 2.17 shows a schematic example of isoparai~etric tramformation between an irregular element and its corresponding regular (master) element. Shape functions along the sides of the master element shown in this example are linear in atid q and consequently they can only generate irregular elements with straight sides. In contrast the master element shown in Figure 2.18 can be mapped into a global element with curved sides. rl
3
Y 1 X
gure 2.17 Isoparametric mapping of an Jrregular quadl-ilrtteral element with sti-aigh-ht sides
n general, elements with curved sides can only be generated using quadratic or higher-order rnasler elements. Isopaaametric transformation functions between a global coordinate system and local coord~natesare, in general, written as
36
WEIGHTED RESIDIJAL FINITE ELEMENT METHODS - AN OUTLPNE
(2.27)
5
(--I 4
(-1 ,--I)
3 X
lsoparametric inapping of an irregular quactrilatcral element with curved sides
where x, and y E are the nodal coordinates in the global system. The shape functions in Equation (2.27) are given in terms of local variables defined by the natural coordiiiate system in the master element. Tsopararnetricmapping can also enerate triangular elements with curved sides, As already ~ x ~ ~ a i n e the local variables in triangular elements are giveii as area coordinates and lience ~ s o ~ a ~ a mmapping e t ~ c functions for triangular elements are expres§ed as
(2.28)
The most convenient coordinate system for a triangular inaster element is based on a ‘natural’ system similar to the one shown in Figure 2.19, where L1 = I - 4 - 71, Lz = and L1 = 7.
” dx3
(x3)’dx3
71
TI
-- 0
(5.74)
After the substitution for A, and A2 into Equation (5.74) the pressure potential equation corresponding to creeping flow of a power law fluid in a thin curved layer is derived as
(5.75) where the flow conductivity coefficients are defined as
0
(5.76)
The scale factors given in the above expressions depend on the curvilinear coordinate system adopted to model a thin-layer flow. For example, the scale factors for a cylindrical coordinate system of (r, 8, z) are h, = 1, ho = r and hz = 1, and for a spherical coordinate system of (R, 0, 4) they are ht( = 1, h e = R and sin 8 (see Appendix and Spiegel, 1974). comparison of flow conductivity coefficients obtained from (5.76) with their counterparts, found assuming flat boundary surfaces in a thinlayer flow, provides a quantitative estimate for the error involved in ignoring the curvature of the layer. For highly viscous flows. the derived pressure potential equation sl.rould be solved in conjunction with an energy equation, obtained using an asymptotic expansion similar to the outlined procedure. This derivation i s routine and to avoid repetition is not given here.
STIFFNESS ANALYSIS OF SOLID POLYMERIC MATERIALS
1
The focus of discussions presented so far in this publication has been on the finite element modelling of polymers as liquids. This approach is justified considering that the majority of polymer-fonning operations are associated with temperatures that are above the melting points of these materials. However, solid state processing of polymers is not uncommon, furthermore, after the processing stage most polymeric materials are used as solid products. In particular, fibre- or particulate-reinforced polymers are major new material resources increasingly used by modern industry. Therefore analysis of the mechanical behaviour of solid polymers, which provides quantitative data required for their design aiid manufacture, i s a significant aspect of the modelling of these materials. In this section, a ~ a l e r k i ~ finite i element scheme based on the continuous penalty method for elasticity analyses of different types of polymer composites is described. To develop this scheme the mathematical similarity between the Stokes flow equations for incompressible fluids and the equations of linear elasticity is utilized. We start with the governing equations of the Stokes flow of incompressible Newtonian fluids. Using an axisymmetric (r, z) coordinate system the components of the equation of motion are hence obtained by substituting the sheacdependent viscosity in Equations (4.11) with a constant viscosity p , as
(5.77)
And the continuity equation which is identical to Equation (4.10)
av, v, 3v, --+-+--=o ar r 8 z
(5.78)
In the continuous penalty scheme used here the penalty parameter is defined as A.=-
2vp (1 - 2v)
(5.79)
where v it; Poisson's ratio which is equal to 0.5 for incompressible material. As seen in Equation (5.79) the present model cannot be applied to analyse perfectly incompressible materials. The working equation of the scheme is identical to Equation (4.70). by comparison it can be shown that the working equations in this scheme are identical to their counterparts obtained by the commonly used equilibrium finite
9
RATIONAL APPROXIMATIONS AND ~ L L U S l ~ A T I VEXAMPLES E
element approach for elasticity analysis, provided that p is defined as the shear modulus and X as the bulk modulus of the matcrial, respectively ( Note that in this case the main field variables should be regarded as displacements instead of velocity components. This similarity provides an important flexibility to switch the model from the analysis of fluid flow to solid material def~rmationunder applied loads. The majority of polymeric materials are processed as liquids and used as solid products. ence, the described approach has the advantagc that it can predict matcrial behaviour in both liquid and solid states using the same computer program. A full account of utilization o€ the present model in the analysis of polymeric composites has been published previously (Ghasse~nieh and Nassehi, 200 1 a) and here only an illustrative a p ~ ~ i c a ~ is i odiscussed. n
ulk mechanical properties of polymeric composites, such as their modulus, depend on the properties of their constituent materials, filler/matrix volume fraction and geoinetrical distribution of the filler phase inside the matrix. C ~ a ~ s i ~ c aoft ipolymer o~~ composites is based on the shape of the ~ ~ ~ n f o r c i i i g phase and hence they are grouped as particulate, continuous or short-fibre coinposites, each associatcd with distinct mechanical properties and used for a dif€~rentpurpose, Therefore in the modelling of ch class of polynier composites a different set of criteria should be considered. owever, the present model has the flexibility to be used under diffcrent conditions for a wide Tariety of polymeric materials (Nassehi et al.. 1993a,b; Ghassemieh and Nassehi, 2QQlb,c), In the following micro-mechanical analysis, it is assumed that the domain of interest for a polymer composite filled with spherical particles can be represented by a unit cell as shown in Figure 5.22. When this unit cell IS rotated 360" around the axis AD, a hemisphere embedded in a cylinder is produced, The inter-particle spacing corresponding to this geometry is equal to 2(rl - r2). Therefore the volume fraction of tlie filler can be calculated from the ratio r z / r l . For a square or cubic array arrangement the relationship between the filler volume fraction and this ratio is giveii as (5.80) While for a hexagonal array tlie same relationship is expressed as Vf =
5):(
3
(5.81)
It should be noted that the described axisymmetric unit cells do not represent actual repetitive sections of a material but their dimensions are related to the
STIFFNESS ANALYSIS OF SOLID POLYMERIC M A T ~ K I A ~ S 1
B
A
b*
c
Y
e 5.22 Problcin doniain in the micro-mechanical analysis o i the particnlatc polymer composite
inter-particle spacing. The theoretical maximum filler volume fractions corresponding to square and hexagonal armys are found when the ratio r2/rl in Equations (5.80) and (5.81) is equal to 1 . These volume fractions are hence found as 0.52 and 0.74 for square and hexagonal arrays, respectively. 111 practice, however, filler volume fractions in polymer composites are much lower than these theoretical values. To simulate tensile loading of the domain shown in Figure 5.22 the following boundary conditions are imposed v- = 0
vz =
v
v, = U vr
=U
along AB (2 = 0) along CD ( z r= bo) along BC ( r = ~ 1 )
(5.824 (5.82b) (5.82~) (S.82d)
where V is a prescribed constant and U is determined from the condition of vanishing average lateral traction rate, defined as
(5.83) 0
In addition to the boundary conditions (5.82a-5.82d), it i s required that the displacement components should vanish on the surface of a rigid filler. The highly constrained boundary conditions shown in Equations (5.82a) to (5.82d) can be relaxed via replacing conditions (5.82~)and (5.82d) by orr= 0 on P‘ = r l which is the stress-free condition along BC. Using this set of ‘unconstraint’ conditions the outer side wall of the cell does not remain straight and
186
RATIONAL APPROXIMATIONS AND 11,LUSTRATIVE E X A ~ ~ L ~ S
vertical under loading. The described relaxation of the boundary conditions permits consequences of deviations from lighly constrained filler distribution to be investigated. esults obtained using relations (5.82a) to (5.82d) are referred to as the ‘with constraint’ analysis. Calculation of the field variables in the ‘unconstraint’ analysis is straightforward, however, to model tlie ‘with constraint’ case, the following procedure is used: (1) The displacements and stress distribution are found imposing conditions (5.82~~) to (5.82d). Note that the displacements arc found using the working equations of the scheme; stresses are found via the variational recovery method.
(2) The field variables are recalculated replacing (5.82b) with v, = 0 along C ( 3 ) The first and second set of resuits are superimposed, therefore the frnal set of results are found as v =V]
+
k
~
2
(5.84)
and = 01
+ kcrz
(5.85)
where k i s determined such that the net force in the r direction along BC is zero, therefore (5.8G) where k+)
BC
(5.87)
Thus the predicted stress along AB is (5.88) And because ( v , ~ ) A=~ 0 the displacement along this direction is expressed as (5.89)
STIFFNESS ANALYSIS OF SOLID POLYMERIC MATERIALS
1
Let us now consider the modulus of the composite defined as the ratio of stress over strain, i.e. E = (cTJE~). The strain in this example is found using the specified boundary condition as
Cl). The average stress along A
ET, = A
is also calculated as
(5.90)
~
A
where A is the area of the top surface of a cylindrical unit cell in the finite element model. Using the results obtained by finite element simulatioris the modulus of a particula~~-filled polymer composite can heiicc be found. i n Figurc 5.23 the finite element model predictions based on ‘with constraint’ and ‘uiiconstrained’ boundary conditions for the modulus of a glasshpoxy resin composite for various filler volume fractions are shown.
20 composite modulus (Pa) x i09
15
10 5
0
10
20
30
40
50
$0
Filler volume fraction (%)
e 5.23 Coniposite modulus obtained using constrained and unconstrained boundary conditions
In Figure 5.24 the predicted direct stress distributions for a glass-filled epoxy resin under ‘uncoiistrained’ conditions for both phases are sllown, The material parameters used in this calculation are: elasticity modulus and Poisson’s ratio of Pa, 0.35) for the epoxy matrix and (76.0 GPa, 0.21) for glass spheres, ccording to this result the position of maxirriiun stress concentration i s almost ~ i r e c ~ above ~ y the pole of the spherical particle. Therefore for a
1
RATIONAL A ~ P R O ~ ~ ~ AND A r IL1,USTRATIVE I ~ ~ S ~ ~ A M P L ~ ~
glass sphere, well bonded to the epoxy resin, the cracks in this mateiial should start from this position and grow in the direction o f direct stress. This has been ~ x p ~ r i ~ i e n t aconfiriiied l~y using scanning electron xnicroscopy ( ~ l ~ a ~ ~ e ~ i e 1998).
0.9 0.8 0.7 0.6 0.5
Position
0.4 0.3 0.2
10
15
20
25
30
35
40
Filler volume fraction (77)
Figure
The predicted direct stress concentration at different locations within the cloiiiaiii
Andre. J. M. ci al., 1998. Numerical modelling of the polymer film blowing procew. In,. 1.Forming P r o c ~ , w s ancl Busic Equations o j Fluid 1WeriEiaiiics, Dover E. 1999. Nunierical simulation of the filni casting process. ssager, O., 1977. Dyrzurriics of Poljmer Fluids, Vol. tfoot, E. N., 1959. Trrrmport PherioPwenu, Wiley,
Chaturani, P. and Narasimman, S., 1990. Flow of power-law fluids in cone-plate viscometer. Acta Mcchmica Clarke, .1. and Freaklcy, P. K., of dispersive mixing and filler agglomerate sire distri~utionsin rubber compounds. Plu.,~. Xithber cbvnycix Process. Appl. 2 241-266. onea, 1. and Quartapclle, L., 1992. An i n t r ~ d u c ~to ~ ~finite i i element methods for transient advection problems. Coinput. Methods AppL Mech. B i g . Chafouri, S.N. and Freakley, P. K., A new method of flow visualisation for rubber mixing. Pol. Test. 13, 171-379,
REFERENCES
1
Ghassernieh, E., 1998. P1i Thesis, Department of Chemical Engineering, Loughborough University, Loughborough. Ghassemieh, E. and Nassehi, V., 200 la. Stiffness analysis of polymeric composites Using the finite element method. Adv. Poly. Tkh. 20, 42-51. Ghassemieh, E. and Nassehi, V.,2001 b. rediction of failure and fracture ~iiechatlismsof polymeric composites ng finite element analysis. Part 1: particulate filled composites. P01.v. Coinpas. Ghassemieh, E. and Nassehi, V., 2001~.Prediction of failure and fracture mechanisms o f polyriieric coniposites using finite element analysis. Part 2: fiber reinforced composites. Poly. Compos. 22, 542- 554. Ghorcishy, M. M, R., 1997. PhD Thesis, Department of Chemical ~ n~ itieering, Loughborough University, Loughborough. Ilannart, B. and Hopfinger, E.J., 1998. Laminar flow in a rectangular diffuser near dimensional numexical simulation. In: Nele-Shaw conditions - a . (eds), Flow ~ ~ u f l ein~~l n~d n~ ~ t rPri u l Lewis, B. A. and Warren, orwood, Chichestcr, pp. 110- 118. Hieber, C. A. and Shen, S.F., 1980. A finite eiemcn~~fini~e differcncc simulation of the injection-moulding filling process. J. Non--~eivtonianFluid Mech. 7, 1-32, Hughes, T. J. R.,1987. TXe Finite Element Method, Prenticc-Hall, Eiiglewood Cliffs NJ. ress - effective flow in rubber mixing. termination of normal stress difference
plifications. In: Tucker, CL.111 (ed.), CoPnpuZer ibfodelng for Polymer Procctr.sifig,cl?a;pter 3, Haiiscr Publishers, Munich, pp. 7-112. Lcc, G. C., Folgar, F. and Tucker, C. E., 1984. Simulation of coiiiprcssion molding for fiber-reinforced thevinosetting polymers. J. Eng. Ind. 10 , 1977. Fi~n~~z~ri~~i~~1.s o j Polyrner Processing, McGrawhillon, J. and MasL-a, L., 19%. Finite ele mechanics of interlayered polynierlfibre ColnpoSit : a study of the i i i t ~ ~ ~ t c ~ i o ~ between thc reinfo s. Cor~ipos.Sci. Tech. Nassehi, V., Kinsella, ascia, I..,1993b. liini delling of the stress distribution in polymer composites with coated fibre interlayers. J. Compos. Mnter. ., 1997. Simulation of free surface flow in partially
ng of flow distribution in ~ o ~ ~ e linl Iyz~z~,st~iul i~g Processes, Chapter 8, Ellis Horwood, Chichester.
190
RATlONAL APPROXIMATIONS AND ILLU STKATIVE EXAMPLES
Olagitju, D.O. and Cook, L.P., 1993. Secondary flows in cone and plate flow of an Oldroyd-B fluid. J. Non-Newtoninn Fluid Mech. 46, 29 -47. Pearson, d. R. A., 1985. Mechanics of Pol~imerProcessing, Applied Science Publishers, Barkings, Essex, UK. Pearson, J. K.A. and Petrie, C . J. S . , 1970a. The flow of a tabular film, part 1: fornial mathematical representation. J. Fluid Merh. 40, I - 19. Pearson, J. R. A. and Petrie, C. J. S., 1970b. The flow of a tabular film, part 2: interpretation of tlie model and discussion of solutions. J. Fluid Mech. Petera, J. and Nassehi. V., 1995. Use of the finite element modelling technique for tlie improvement of viscometry results obtained by cone-and-plate rheometers, J. 1VoizNewtonian Fluid Mecli. 58, 1-24. Petera, 1. and Nassehi, V.. 1996. Finite element modelling of free surfacc viscselastic flows with particular application to rubber mixing. h t . J. Numer. Methods Fluids 23, 1117-1132. Petera, J., Nassehi, V. and Pittman, J. F. T., 1993. Petrov CMerkin methods on isoparametric bilincar and biquadratic elements tested for a scalar convection-diffusion problem. Int. J. Numer. Methods Heat Fluid Flow 3, 205-222. Petera, J. and Pittinan, J. F. T., 1994. Tsoparametric Hermite elements. Ink. J. ATuiner. Methods Eng. 37, 3489-3519. Sander, R., 1994. PhD ‘Thesis. Cheniical Engineering Department, University College of Swansea, Swansea. Schlichtirrg, H., 1968. BouPidury-Luyer Theory. McGraw-Hill, New York. Soli, S. K. and Chang, G. J., 1986. Boundary conditions in the niodeling of iiqection mold-filling of thin cavities. Polynz. Eng. Sci. 26, 393-399. Spiegel, M.R., 1974. Vector Analysis, Scliawn’s outline series. McGraw-Hill, New York. Tanncr, R. I., 1985. Eagineering Rheology, Clarendon Press, Oxford.
In the finite element solution of engineering problems the main tasks of mesh generation, processiiig (calculations) and graphical representation of results are usually assigned to independent computer programs. These programs can either be embedded under a common shell (or interface) to enable the user to interact with a41 three parts in a single environment, or they can be implemented as separate sections of a software package. Development and ~ r g a n i ~ a t i oof n graphics programs requires expertise in areas of computer science and software design which are outside the scope of a text dealing with h i t e element techniques and hence are not discussed in the present chapter. Detailed explan~tio~i of mesh generation techniques and mathematical background of the available methods - although of general importance in numerical computations - are also not related to the main theme of the present book. Tn the following sections of this cliapter therefore, after a brief description of the main aspects of mesh generation, other topics that are of central importance in the finite element olyrner processes are discussed.
As disc~isse~ in the previous chapters, discretization of the solution doinaiii into an appropriate computational mesh is the first step in the finite element simuain factors in the selection of a particular mesh design for a problem are domain geometry, type of the finite elements used in the discretization, required accuracy and cost o f computations. In this respect, the accuracy of c o ~ p ~ t a t i o ndepends s on factors such as: consistency of the adopted mesh with the problem domain g~onietry, nature of the solution sought, and total number, size, aspect ratio and type of elements in the mesh.
FINITE ELEMENT SOFTWARE
MAIN COMPONENTS
As a gcneral rule simulations obtained on coarse grids consisting of deformed elements of high aspect ratio are expected to have poor accuracy and should be avoided. In order to iiicrease the accuracy of the solutions however, the mesh refinement shottld be based on a systematic approach which takes into account featL~resof the physical phenomenon being analysed. Therefore it is necessary to use all available knowledge about the nature of the problem as a guide to optiinize the mesh design and refinement.
es Finite element solution of eiigineering problerns inay be based on a ‘structured’ or an ‘unstructured’ mesh. In a structured mesh the form of the elements and local organization of the nodes (i.e. the order of nodal connections) are indep e ~ ~ e of n ttheir position and are defined by a general rule. In an unstructured mesh the connectioii between neighbouring nodes varies from point to point. Therefore using a structured mesh the nodal connectivity can be i ~ ~ p l ~ c i t l y d e ~ and ~ explicit ~ e ~ inclusion of the connectivity in the input mesh data is not bviously this will not be possible in an unstructured mesh arid nodal ut the computational grid must be s aified as part of the grids tant, however, to note that s t r ~ ~ c ~ uco~pL~lationa1 re lack flexibility and hence are not s ble for engineering problems which, in general, involve complex geometrics. cretization of domains with comi~licate~~ ~oundariesusing structured grids is y to result in badly distorted elements, thus pr g robust and accurate numerical solutions. Using an unstructured mesh, rical complexities can be handled in a more natural manner allowing for local adaptation. variable element conc ation and p r c f c r e ~ i t ~ ~ ~ lution of selected parts of the problem domain. wever, because o f the rent complexity of data handling in unstructu mesh gene ratio^ this oach requires special progranis for the organization and recor~ingof nodes, nl edges, surfaces, etc. which involve extra memory reqLiir~ni~nt.In p ~ r ~ ~any c ~increase ~ ~ r in , the number of e ~ e ~ c n during ts mesh r e f i n ~ ~ e n t requires rapidly rising computational efforts. A further drawback Cor uris~ructuredgrids is the difficulty o f handling moviiig boundaries in a purely angian approach in the siiiiL~lationof flow problen~s. o resolve the problems associated with structured and LinstrL~ctL~~~d grids, these fundame~tal~y different approaches may be combined to generate mesh types which partially posses the properties of both catcgoi-ies. This gives rise to ‘block-~~ructLi~~d’, ‘overset’ and ‘hybrid’ mesh types which under certain conditions may lead to more efficie simulatioiis than the either class o f purely structurcd or u ~ i s t ~ ~ c t ugrids. red etailed discussions related to the properties sses of coinputational grids can be found in specialized textbooks eikin, 1999) and only brief de~nitionsare given here.
CONSIDERATTONS RELATED TO FINITE. ELEMENT MESH GENERATION
Tn this approach the domain of the solution is first divided into a number of large sub-domains without leaving any gaps or overlapping. This division provides a very coarse unstructured mesh which is used as the basis for the generation of structured grids in each of its zones. The union of these local grids gives a computational grid for the entire domain, called a block-structured (or a m ~ i ~ ~ i - b l omesh, c k ~ The ~ e x i ~ igained ~ i ~ yby this approach can be used to haiidle complicated doniains having multiply connected boundaries, problems involving heterogeneous physical phenoniena and matheintttical non-uniformity. Figure 6.1 shows representative examples of block-structured grids with diffe~entforms of linking or ‘comniunication interface’ between adjacent sub-regions.
(discontinuous)
I
(non-smooth)
igure 6.1 Types of interface between blocks in block-structured grids
It is important to note that finite element computations on multi-block grids iiiv~lvinga dj$conti~uo~is interface are not straightf~rwardand special a ~ ~ a ~ g e inents for tlic transformation of nodal data across the internal boundaries are required.
verset grids ]in these girds the sub-regions or blocks are allowed to overlap and therefore the formation of a global grid is based on the assembly of i n ~ ~ v i ~ gu ean~~~r ayt e ~
I.
FlNlTE ELEMENT SOFTWARE
- MAIN COMPONENTS
structured mesh for sub-sections of the problem domain. To preserve the consistency of finite element discretizalioiis coirimunication between the overset regions should be based on systematic data traiisfo~matio~ using appro~riate interpolation procedures over overlapping areas of the computational grid. Figure 6.2 shows an example of this type o f computational mesh.
~~~~~e6.2 Representative fragment of an overset mesh
hrid grids ybrid grids are used for very complex geoinetries where combination of structured mesh segments joined by zones of unstructured mesh can provide the best approach for discretization of the problem domain. The flexibility gained by combining structured aiid unstructured mesh segments also provides a facility to improve accuracy of the numerical solutions for field problems of a c o n i p ~ ~ ~ anature. ted Figure 6.3 shows an example of this type of computational mesh.
e 6.3 Representative fragment of a hybrid mesh
CONSI~E~TIO KELATED ~S TO FINITE ELEMENT MESH GENERATION
It should be emphasized at this point that the basic requirements of cornpatibility and consistency of finite elements used in the discretkation of the domain in a field problem cannot be arbitrarily violated. Therefore, application of the previously described classes of computational grids requires systematic data transfo~nationproccdures across interfaces involving discontinuity or overlapping. For example, by the use of specially designed ‘mortar elements’ necessary coinmuiiicatiovl between illcompatible sections of a finite element grid can be established ( aday et al., 1989).
era The most common approaches for the generation of structured grids are as follows: Algebraic niethods - in these techniques calculation of grid coordinates i s based on the use of interpolation formulas. The algebraic methods are fast and relatively simple but can only be used in domains with smooth and regular boundaries. Differential methods - in tliese techniques the internal grid coordinates are found via the solution of appropriate elliptic, parabolic or hyperbolic partial differential equations. Using these procedures it is always possible to generate smooth internal divisions. Therefore they offer the advantage of preventing the extension of the exterior boundary discontinuities to the inside of the problem doinain. Variational methods - theoretically the variational approach offers the most powerful procedure for the generation of a computational grid subjcct to a multiplicity of constraints such as smoothness, uniformity, adaptivity, etc. which cannot be achieved using the simpler algebraic or d~fferen~ial techniques. However, the development of practical variational mesh generation techniq~tesis complicated and a universally applicable procedure i s not yet available. The most c o n ~ o approaches n for the generation of u n s t r u c t ~ ~grids r e ~ are as follows: ctree method - this method consists of two stages. In the first stage the problem domain is covered by a Cartesian grid and during the second stage this grid i s r ~ c ~ r s i ~subdivided. e~y owever, in this technique the computational domain bouii~aryis effectively constructed by combi~ingsides of grid elements and may not exactly match the prescribed problem domain bo~~tidary .
FINITE ELEMENT SOFTWARE - MAIN COMPONENTS
Delatinay method - in this method the computational grid is essentially constructed by connecting a specified set of points in the problem domain. The connection of these points should, however, be based on specific rules to avoid unacceptable discretizations. To avoid breakthrough of the doniain ~ o ~ ~ ~itdmay a r be y necessary to adjust (e.g. add) boundary points (Liseikin, 1999). dvanc~ngfront method - grid generation in this method starts from the boundary and is progressively moved towards the interior by the successive co~inect~on of new points appearing in front of tlie moving front until the entire doinain is meshed into elements. At the closing stages of the procedure the advancing front should be defined in a way that i t does not fold on itself. The selection of advancing step size should also be based on careful consideration and made to vary with the size of remaining uniiieshed space. In most types o f unstructured grid generation a secondary ~ n i o o t h i ~is~ g required to improve tlie mesh properties. In the majority of practical finite element s i ~ u l a t i o ithe i ~ mesh generation is c o ~ ~ ~ iinc conjunction tc~ with an interactive graphics tool to allow feedback and continuous monitoring of the c o ~ p u t a t i o n grid. ~~l The development of more robust, accurate, flexible and versatile mesh generation methods for facilitating the application of niodern coinp~tatioiial schemes is an area of active research.
typical finite element processor (sometimes called the ‘number ~ r u n ~ ~ i e r ’ ) program consists of the following blocks: Input and output subroutines to read and echo print data, allocate and initialize working arrays, and output the final results generally in a form that ost processor can use for graphical represe~tations~ Finite element library subroutines containing shape functions and their derivatives in terms of local coordinates. uxiliary subroutines for handling coordinate transfo~atioiibetween local and global systems, quadrature, convergence checking and updating of physical parameters in non-linear calculations.
MAIN COMPONENTS OF FINITE ELEMENT PROCESSOK PRO^^^^^^^
7
The main subroutine for evaluatioii of the elemeiital stiffness equations and load vectors. 0
Solver subroutines dealing with the assembly of elemental matrices and solution of the global set of algebraic equations.
Families of finite. elements and thcir corresponding shape functions, schemes for derivatiori of the elemental stiffness equations (i.e. the working e ~ ~ a ~ i ~ n s and updating of non-linear physical parameters in polymer processing simulations have been discussed in previous chapters. However, except for a brief explanation in the worked examples in Chapter 2, any detailed discL~ssion of the n u m ~ r i ~ solution al of the global sct of algebraic equations has, SQ far, been avoided. We now turn our atteution to this iniportant topic. Let us first consider the assembly of elemental stiffness equa tiolns in the simple example shown in Figure 6.4.
7
8
Global node numbering in a simple mesh consisting of bi-linear elements
e assume an e~einen~al node nu nib er^^^ order in the clockwise ~ ~ ~ e c tas ~on. shown in Figure 6.5.
.S
Local order of node nuinbering
ith respect to the selected e ~ e ~ e n and t a ~global orders of node ~ i ~ ~ ~ the elemental stiffness equations for elements el, et[ and e l in ~ Figure ~ G. expressed as
FINITE ELEMENT SOFTWARE
1%
for
- MAIN C Q M F O N E N ~ ~
e1
for ell
uring the assembly process the coefficients correspondiiig to the same degrees of freedom (i.e. the unknowns with equal indices) appearing in the elemcntal stiffness equations should be added together. Therefore the a ~ s e n ~ ~ l ~ global system for this example, arranged in ascending order of the unknowns, is
As thc number of elements in the mesh increases the sparse banded nature of the global set of equations becomes increasingly more apparent. However, as Equation (6.4) shows, unlike the one-dimensional examples given in Chapter 2, the b ~ ~ n d w ~ in d t hthe coefficient matrix in multi-dimensio~alproblenis is not constant and the main band may iriclude zeros in its interior terms. It is of course desirable to minimize the bandwidth and, as far as possible, prevent the a p ~ e ~ ~ r a nofc ezeros inside the band. The order of node numbering during
NUMERICAL SOLUTION OF ALGEBRAIC EQUATlONS
the mesh generation stage directly affects both of these objectives and should therefore be optiinized. In general, the imposition of boundary conditions is a part of the assembly process. A simple procedure for this is to assign a code of say 0 for an unknown degree of freedom and 1 to those that are specified as the boundary conditions. Rows and columns corresponding to the degrees of freedom marked by code 1 are eliminated from the assemblcd set and the other rows that contain them are modified via transfer of the product of the specified value by its correspo~~din~ coefficient to the right-hand side. The system of equations obtained after this operation i s determinate and its solution yields the required results.
Obviously selection of the most efficient elements in conjunction with the most appropriate finite element scheme is of the outmost importance in any given owever, satisfaction of the criteria set by these considerations cannot guarantee or even determine the overall accuracy, cost and general efficiency oi‘ the finite element siniulations, which dcpcnd more than any other factor on the algorithm used to solve the global equations. To achieve a high level of accuracy in the simulation of realistic problems usually a refined mesh consisting of hundrcds or even thousands of elements is used. In comparison to lime spent on the solution of the global set, the time required for evaluation and assembly of elemental stiffness equations is small. Therefore, as the number of’ equations in the global set grows larger by mesh refinement the computational time (and hence cost) becomes more and more dependent on the effectiveness and speed of the solver routine. The development of fast and accurate co~putational procedures for the solution of algebraic sets of equations has been an active area of research for many decades and a number of very efficient algorithms are iiow available. s menti~nedin Chapter 2, the numerical solution of the systems of algebraic equations is based on the general categories of ‘direct’ or ‘iterative’ procedures. In the finite clement modelling of polymer processing problems the most frequently used methods are the direct methods. Iterative solution inethods are more effective for problems arising in solid mechanics and are not a commoti feature of the finite element ~ o d c l l of i~~ polymer processes. wever, under certain conditions they inay provide better computer economy n direct methods. In particular, these methods have an inherent compatibility with algorithms used for parallel processing an are ‘poteiitial~y’more suitable for three-dimensional flow modelling. chapter we focus on the direct methods commonly used in Aow simulation models.
FINITE ELEMENT SOFTWARE
0
-
MAIN COMPONENTS
.I The most important direct solution algorithms used in finite element computations are based on the Gaussiaii eliniination method. To describe the basic concept of the Gaussian elimination eth hod we consider the following system of simultaneous algebraic equations
Let LN suppose that we can convert the n x system (6.5) into an upper triangular form as
1.1
coefficient matrix in e
where all o f the elements in the coefficient matrix which are below the main d i a g o ~ aare ~ zero. The superscripts (*) in the non-zero terms of the coefficient i ~ a ~ rand i x the r i g ~ t - ~ ~ aside n d of ~ ~ L ~ ~(6.6) t i osigiiify n the change in the values ts during the conversion of the original system to the u is evident that xn can be found i~mediatelyfro tern and the solution can hence progress by substit imatc equation to find q - 1 and so on. iiiatio~~ e t h ~or ~o v i ~ ae s$ystein~tica ~ ~ forri ~ ~p ~ de - ~ ~ e ~ t a t of ~ othen described 'forward reduction' and %back sL~bstit~~tion' processes for large systems o f algebraic equations.
ivotiF'ER It is readily recognized that in order to generate zeros in the columns of the c ~ ~ f ~matrix ~ i einnan ~ n X n system of algebraic equations ~nultiplesof successive rows should be subtracted from the rows which are above t e x a m p l ~after ~ multiplication o f the second row in Equation (6.5) by a1 m the first row the first c o ~ ~ o n e of' n t the new owever, in a large set of e~uatiollswith widely ration may give rise to .c/ery large or very small causing overflow or underflow in the c o ~ p u t e rsystem operat~on§ the solution impossible or inaccurate. There i s also the creation of zeros in the main diagonal of the system of equations that makes the ~ n t ~set r e s i n g u ~ and ~ r hence not solvable. To avoid t~iese~roblemsa p r o ~ ~ d u r e
NUMERICAL SOTLJTION OF AL,CEBRAIC EQUATIONS
1
known as pivoting IS used. This is described as rearranging the orderkg of the equations in the set, in every step of the foiward reduction, so that the coefficient of largest magnitude is located on the main diagonal. This can be achieved by interchanging rows and columns in the set. If both row and colurm,. interchanges are carried out the process is called jki6 pivoting. However, this is seldom necessary as the coefficient of largest magnitude can usually be placed on the main diagonal by p m t b l pivoting which only requires row interchange. t is evident that mLiltiplicatioii of the sides of an equation in a system by a large number will affect the pivot selection. In particular if the scaling of thc equations in f d l pivoting is ignored equations with larger positioned at rows above those having smaller coefficients. process during the reduction stage niny lead to a situation in which the coeffcients of equations located at the bottom rows are insignificant in comparison to the values of the terms at the top rows. This can become a sourcc of unacce able computational errors. To avoid dependence of pivoting on the scaling the equations, the system ould be normalized to make the largest ~ o e r ~ cini e ~ ~ ess et al., 1987). each row equal to unity The use of a uniform scale in partial pivoting can also significantly redrice round off errors (Gerald and Wheatley, 1984).
The sotution of linear algebraic equations by this method is based on the following steps: Step I - thc n x n coefficient matrix is augmented u7ith the load vector on the right-hand side to form an PZ x (n +- 1) matrix. Step 2 - interchanging rows the value of all is made to be the coefficient o f largest magnitude in the first column. Step 3 - subtracting a,llall times the first row from the ith row, the coefficients in the first coluinii from the second through nth rows are made equal to zero. The multiplier uZ1/a1 I is stored in u r I . i = 2, . ,n. I
(.
- steps 2 and 3 are repeated for thc second through the (n - 1)st rows, placing the coefficient of largest magnitude on the diagonal by interchanging rows (for only TOWS j to PZ)and subtracting times the jth row from the it11 row to create zeros in all positions o f tliejth column below the diagonal. The multiplier o,,/oJJi s stored in a,, i = .j + 1, . . . ,iz (note that U,/ aiid uu used during this step are different from their initial values given in the original set of equations). At the end of this step the forward reduction processes are carried to completion and the original PZ x n system is converted into an upper t ~ j a ~ ~ ~ form. ilar
20%
FINITE ELEMENT SOFTWARE - MAIN CONI'ONENTS
Step 5
-
the last equation is solved to give xn = a*,,,+~/a",,,
tep 6 - the remaining unknowns are found by back substitution using the following formula from the (n - I)st to the first equation in turn
Number of operalions in the Guussian elimination method To estimate the computational time required in a Gaussian elimiiiatioii procedure we need to evaluate the number of arithmetic Operations during the forward reduction and back substitution processes. bviously multiplica~ion and division take much longer time than addition and subtraction and hence the total time required for the latter operations, especially in large systems of eq~ations,is relatively small and can be ignored. Let us Gonsider a system of simultaneous algebraic equations, the representative calculation for forward re~uctionat stage i s expressed as k - k- 1
llZi - ai~
&l zk 1 L . k - l lcJ kk
k = 1, . . . , (12- 1)
where
j - (k+ I ) , . . . , ( U + 1) i = ( k t l ) , . . , (a)
(6.7)
The a ~ ~ g n i ~ ncoefficiellt ted matrix at this stage can be shown as
,
Rows reduced to upper triangular form
............................. tn-k)
...........................................................
I
{
ectangular sub-matrix
As ~ q u a t ~ o(6.7) i i shows in each of (a - k) rows in the rectangular sub-matrix we need to evaIuate (n - k ) multipliers and carry out (n - k + I) multiplications, therefore the total number of operations required is calculated as 91-1
[ ( n - k ) ( n - k + I ) + ( n - k ) ] ;=: I> pz and S, = 113 n3.
+ I ) + (?I
--
k)]dk=
-n
(6.8)
SOIdUTIIOW ALGORITHMS: GAUSSIAN ELIMXWATTON METE-TOD
The described ‘operations count’ provides a guide to estimate the comp~rtational time required for reduction of a full n x n matrix to upper triangular owever, the global set of equations in finite element analysis will always be represented by a sparse banded (it may also be symmetric) coefficient matrix. It is therefore natural to consider ways for the exclusion o f zero terms from arithmetic operations during computer implementation of the Gaussian elimination method. An additional advantage of modification of the basic procedure to enable the forward reduction to be applied only to the non-zero terms is to reduce the storage (i.e. core) requirement. To take full advantage of this possibiIity it is important to optimize the global node numbering in the finite element mesh in a way that tlie inaxiinurn bandwidth of non-zero terms remains as small as possible and creation of zeros in the interior elements of the band i s avoided. Efficient band solver procedures such as the active coZurnn or skyline reduction method are now available ( athe, 1996) which provide maximum computer economy by restricting the number of operations and high-speed storage requirement.
The most frequently used modifications of the basic Gaussian eliininalion method in finite element analysis are the ‘ L U decomposition’ and “Jontcil solution’ techniques.
is This techiii¶ue (also known as the Grout reduction or Cholesky fa~tori~ation) based on the transformation of the matrix of coefficients in a system of algebraic equations into the product of lower and upper triangular matrices as
Therefore a l l = l l l x l = 111, a21 = Z2,, etc. (elements in the first coluima o f a are the same as the elements in the first columii of E); similarly multiplying rows of I by columns of U and equating the result with the corresponding element of a all of tlie clernents of lower and upper triaiigular matrices are found, The general formula for obtaining elements of I and U can be expressed as
2
FINITE ELEMENT SOFTWARE
-
MAIN COMPONENTS
After obtaining the described decomposition the set of equations can be readily solved. This is because all of the information required for traiisforniation of the coefficient matrix to an upper triangular form is essentially recorded in the lower triangle. Therefore inodification of the right-hand side is quite straightforward and can be achieved using the lower triangular matrix as
(6.11)
ence the solution is found by back substitution based on X,
= b,*
(6.12)
In some applications the diagonal elements o f the upper triangular matrix are not predetermined to be unity. The formula used for the LU ~ecompos~tiol~ procedure in these applications is slightly different from those given in Equations (6.10) to {6.12), (Press et al., 1987). The LU decomposition procedure used in c o n ~ ~ n c t ~with o n partial pivoting provides a very efficient method for the solution of systems of algebraic equations. ‘The main advantage of this approach over the basic Gaussian elimination method is that once the coefficient matrix is decomposed into a product of lower and upper triangular matrices it remains the same while the right-hand side can be changed. Therefore different solutions for a set of algebraic equations with different right-hand sides can be found rapidly. Tn practice this property can be used to investigate the effect o f altering boundary conditions in a field problein with maximum computing economy. This property of the LU decomposition procedure can also be utilized to minimize the computational cost of iterative improvement of the accuracy of the solution of systems of linear equations (see Section 5.2).
SOLUTION ALGORITHMS: GAUSSTAN ELIMINATION METHOD
Computer implemen~ationsof band solver routines based on methods such as k U decomposition essentially depend on the “in core’ handling of the totally assembled e~ementalstiffness equations. This may prevent the use of small PCs (or even medium-size workstations) for simulation of realistic ei~ginee~ing problems, which require a relatively refined finite element mesh. The fronlal solution procedure, originally developed by Irons (1970), avoids this p~oblemby piecemeal reduction of the total matrix (or non-zero band) in a Gaussian elimination procedure. The original routine handled the solution of symmetric positive-definite matrix equations, however. in many problems (especially in the finite elemeiit simulation of flow processes) the equations to be solved are nonsymmetric. Therefore, in flow modelling a non-synmietric version of the original algorithm, developed by ood (1976), is usually used. The basic concept of the frontal solution strategy A work array of limited size (say d x J , where J is called the front width) is selected as the pre-assigned core area for the assembly, pivoting and reduction of elemental stiffness equations. Using a loop elemental stiffness matrices are assembled until the work array i s filled. n tliis limited area of the total matrix pivoting is ~ ~ p ~ e r n eand ~ t eforward d reduction is carried out. After e ~ i i ~ i i ~ a t i o ~ of a sufficientriumber of coefficients in the work array further assembly becomes possible and the cycle can be repeated. The progress of assembly and elimination and position of the front in a finite element mesh is shown, schematica~~y, in Figure 6.6. The active front shown in the figure implies that, at this stage of the process, coefficients of elemental stiffness equations for elcments 1 to 4 corresponding to variables which are not on the front have already been fully assembled and reduced.
ent next in line for assembly
Figure 6.6 Frontal solution scheme
Frontal solution requires very intricate bookkeeping for tracking coefficients and making sure that all of the stiffness equations have been assembled and fully reduced. The process time requirement in frontal solvers is hence larger than a straightforward band solver for equal size problems. Another consequence of using this strategy is that, unlike band solver routines, global node iiumbering in frontal solvers may be done in a completely arbitrary manner. Howwer, better computer economy is achieved if an eleinent nL~mberingwhich minimizes front width is used. In general, m a ~ i p u l a t ~ofo ~
206
FINITE ELEMENT SOFTWARE - MAIN COMPONENTS
element numbering in a global domain is mucli simpler than nodes, consequently mesh design optimization in programs using frontal solvers i s simpler than those based on band solver routines.
NA
S
As mentioned earlier, overall accuracy of finite element computations is directly determined by the accuracy of the inethod employed to obtain the numerical solution of the global system of algebraic equations. In practical simul~tjoiis, therefore, computational errors which are liable to affect the solution of global stiffhess equations should be carefully analysed.
All coinputer systems operate under a predetermined floating-point word length which automatically imposes the rounding-off of digits beyond a given limit in all calculations. It is of course possible to use double-precision arithmetic to increase this range but the restriction cannot be removed completely. Therefore through accumulation of round-off errors, especially in simulations involving large numbers of calculations, serious computational problems may arise. In the solution of simultaneous algebraic equations, severity of pathological situations related to round-off errors depends on the conditioning of the coefficient matrix in the system. Conditioning of a matrix depends on: how sinall (i.e. near zero) i s its smallest eigenvalue and, more importantly how large is the ratio of the largest to the smallest eigenvalue. he degree of conditioning of a matrix is determined by the ‘ c ~ n ~ nurnbrr’ ~~fi~n fined as (Fox and (6.13) where A, and A1 are the largest and smallest eigenvalues of A, respectively. In practice the condition number is found approximately using the upper bound of A, as :A = IlAlI, where l(All represents any matrix norm, and a lower bound for A,, using the method of inverse itcration for the calculation of eigenvectors athe, 1996). Therefore cond ( A ) M
-
(6.14)
A1
A matrix with a large condition number is commonly referred to as ‘illconditioned’ and particularly vulnerable to round-off errors. Special techniques,
REFERENCES
2
generally known as preconditioning (Gluob and Van Loan, 1984), are used to overcome problenis associated with the numerical solution of ill~conditioned matrices.
Consider the solution of a set of linear algebraic equations given as (6.15) Let us assume that a numerical solution for this set is found as [.x)+(S.x), where {Sxl is iin unknown error. Therefore insertion of this result into the original equation set should give a right-hand side which is different from the true ( h f . Thus
]{.x + SX}
= {h
+ 6b}
(6.16)
Subtraction of Equation (6.15) from Equation (6.16) gives (6.17) ~ e p l a c ~ for n g (Sb} from Equation (6.16) in Equation (6.17) gives
[A]{ SX} = [A]{ x + SX}
- {b}
(6.18)
The right-hand side in Equation (6.18) is known and hence its solution yields the error {6x} in the original solution. The procedure can be iterated to improve the solution step-by-step. Note that implementation of this algorithm in the context o f finite element c~mputationsniay be very expensive. A significant advantage of the LU decomposition technique now becomes clear, because using this technique [A] can be decomposed only once and stored. Therefore in the quation (6.18) only the right-hand side needs to be calculated.
Bathe, K. J., 1996. Finite Element Procedure, Prentice Hall, Englewood Cliff, NJ. Fox, L. and Msyers, D.F., 1977. Cofltputing Methods for Scientists urad Engineers, Clarendon Press, Oxford. Gerald, G. F. and Wheatley, P. O., 1984. Applied Numerical Aiialysis, 3rd edn, AddisonWesley, Reading, MA. Gluob, G .H. and Van Loan, C . F., 1984. Mutrix Computations, Johns University Press, Baltimore.
FINITE ELEMENT SOFTWARE - MAIN COMPONEN'TS
Hood, P., 1976. Frontal solution program for unsyrnmetric matrices. Int. .I. Xumeu. Lh4!elhods Eng. 10, 379 399. 970. A frontal solution for finite element analysis. hi.J . n'zmzer. Methods 1999. Grid Gerzeration ilethods, Springer-Verlag, Berlin. vripilis, C. aiid Petera, A. T., 1980. Nonconforming mortar clciiicnt methods: application to spectral discretizations. In: Chan, T. F., Glowinski, R., Periaux, 3 . and Widlund, 0.B. (eds), Dowtuitz Decomposition ~ ~ ~ h SIAM, o d s ~ Philadelphia, pp. 392 418. Press, W. H. et ul., 1987. Numericul RecQes - The Art qf ScimfiJic Computing, Cambridge University Press, Cambridge,
In this chapter details of a computer program entitled PPVN.f are described. This prograiii is based on application of tlie Galerkin finite element method to the solutioii of the governing equations of generalized Newtoniaii Row. Flow equations are solved by the continuous penalty scheme and streamline upwinding is applied to solve the coiivection-dominated energy equation. Nodal values of pressure (and stress components) are found by the variational recovery method. In the last section of this chapter the program source code is listed which includes basic subroutines required in the finite element simulation of non-isothermal incompressible generalized Newtonian flow regimes. The central concern in the development of PPVN.f has been to adopt a programmi~igstyle that makes the modification or extension of the code as convenient as possible for the user. As an example, the modifications required for extension of the program to axisymetric domains are discussed. It is shown that by comparing the working equations used in PPW.f, with their counterparts for axisymmetric domains, necessary mod~ficationsfor this extension can be readily i ~ ~ ~ t i fand ied implemented. In the following sections, the solution algorithm used in P and the function of each subroutine in the code are explained. A manual describing the structure of the input data file is also presented. Finally, a simple example of the application of the program is included which shows tlie simulation of non-isothermal flow of a power law fluid in a two-dimensional domain.
7.
IT
PPVN.f is a FORTRAN program for the solution of steady state, generalized Navier Stokes arid energy equations in two-dimensional planar domains. This program uses a decoupled algorithm to solve the flow and energy equations iteratively. The steps used in this algorithm are shown in the following chart:
COMPUTER SIMULATIONS - FINITE ELEMENT PROGRAM
SOLVE CREEPING ISOTHERMAL ~ FLOW EQUATIONS
W
T
~
~
I
A
~
TO CALCULATE SECOND INVARIANT OF THE RATE OF
SCALAR INVAlUANT FOUND IN THE LAST STEP IS
THE SHEAR RATE (i.e. 9) USED IN POWER-LAW EQUATION. INSERT THIS VALUE TO UPDATE THE
I
FOR C O W E R
S T ~ S USING S VARIATIONAL
.f consists of a main module and 24 subroutines. These subroutines and their assigned tasks are described in this section. Variables in these subrou~ines are all defined using 'comment' statements inserted in the listing of the program code.
PROGRAM SPECIFICATIONS
AIN: The tasks allocated to the main module are: (i)
efines and allocates memory spaces and initializes variable arrays used in the program.
(ii)
Opens formatted file channels for input and output and the scratch files that are required during the calculations.
(iii)
Asks the user to give the input data file name (interactively).
(iv)
eads the input data file. The ‘read’ statements are either included in the main module or in the subroutines that are designed to read specific parts of tlie data file.
(v?
Checks the acceptability o f the input data
(vi?
Calls subroutines that prepare work arrays and specify positions in the global system of equations where the prescribed boundary conditians shouId be inserted.
(vii)
tarts the ‘solution’ loop.
(viii)
repares the output files.
~ A ~ S SGives F . Gauss point coordinates and weights required in the numerical integration of the members of tbe elemental stiffness equations.
S H A ~Gives ~ . the shape fuiictions in terms of local coordiiiates lor bi-linear or bi-qundratic qu~drilateralelements. DERIV. Calculates the inverse of the Jacobian matrix used in isoparanietric transformations. SECINV. Calculates the second invariant of the rate of deformation tensor at the integration points within the elements. FLOW. Calculates members of the elemental stiffness matrix corresponding to the flow model.
ENERGY. Calculates members of the elemental stiffness matrix corresponding to the energy equations. TRESS. Applies the variational recovery method to calculate nodal values o f re and, components o f the stress. A mass lumping routine is called by SS to diagoiialize the coefficient matrix in the equations to e~iminatethe
1’2
~
~ SIMULATIONS P ~ ~ - FINITE E R ELEMENT PROGRAM
~
reduction stage of thz direct solution. Prints out nodal pressure and stress components. These results should be stored in a suitable file for post-processing.
PM: Diagonalizes a square m&trix. ~ ~ Assembles V elemental ~ stiffness ~ :equations into a banded global matrix, imposes boundary conditions and solves the set of banded equations using the LU decomposition method (Gerald and Wheatley, 1984). S LVER calls the following 4 subroutines: - reads and assembles the elemental stiffness equations in a handed form, as is illustrated in Figure 7.1 to minimize computer memory requjrcnieiits.
~~~~~
7.1
Arrangement of the global matrix in the band-solver subroutine
- calculates the maximum bandwidth of non-zero terns in tlie AN coefficient matrix.
DIFY - addressing of members of the coefficient matrix are adjusted to allocate their row and column index in the banded matrix.
SOLVE - inserts the prescribed boundary conditions and uses an LU decomposition niethod to solve the assembled equations. eads and echo prints nodal coordinates; formatting should match ETN the output generated by the pre-processor. eads and echo prints element connectivity; formatting should match the output generated by the pre-processor. eads and echo prints prescribed boundary conditions, formatting should match the output generated by the pre-processor,
INPUT DATA FILE
CV: Inserts the prescribed velocity boundary values at the allocated place in the vector oC unknowns for flow equations. CT: Inserts the prescribed temperature boundary values at the allocated place in the vector of unknowns for the energy equation.
CLEAPU': Cleans used arrays at the end of each segment and prepares them to be used by the next component of the program. : Rearranges numbers of nodal degrees of freedom to make them compatible with the velocity components at each node. For example, in a ninenoded element allocated degree of frecdom numbers for v I and v2 at node n are X , and Xn+3, respectively.
AT: Reads aiid echo prints physical and rheological parameters and the penalty parame ter used in the simulation. VTSCA: Calculates shear dependent viscosity using the power law model.
L: Calculates ratio of the difference of the Euclidean norm ( L a ~ ~ d u s and Pinder, 1982) between successive iterations to the norm of the solution, a5
where r is the number of the iteratioii cycle, N is the tolal nuniber of degrees of' om and E is the convergence tolerance value. Note that criterion (7.1) is used for both velocity coi~iponentsand temperature in separate calculations. A converged solution is obtained when both sets of results satisfy this criterion. OUTPUT: Prints out the computed velocity and temperature fields. For postprocessing the user should store the output in suitable files
Structure of the input data file required for the running of P Line 1 Title format(A40)
COMPUTER SIMULATIONS - FINITE ELEMEKT PROGRAM
asic control variables
format(Ji5, 2f10.0) ncn ngaus mgaus alpha beta
= = = = =
number of nodes per element number of full integration points number of reduced integration points parameter to mark shear terms in the Bow equations parameter to mark penalty terms in the flow equations
Line 3 Mesh data format(Ji5) iinp nel nbc
= total iiuinber o f nodes
= total number of elements = total number of boundary conditions
Line 4 ~onvergeiicetolerance format(2f LOS)
tolv tolt
= tolerance parameter for the convergence of velocity calculations
= tolerance parameter for the convergence of te~iiperature calc~i~ations
Line 5 Rheological aiid physical parameters format(7flO.O) wise power tref tbco roden CP condk
= coiisistency coefficient in the power law model = power law index
= reference temperature in tem~erature~~ependent power law model = temperature dependency coefficient in the power lam7 inadel = fluid density = specific heat capacity of the fluid = conductivity coefficient
Line 6 Penalty paraineter format(fl5.0)
rplarn = penalty parameter
EX~ENSIONOF w v N . r TO AXISYMME'I'RICP K O B L ~ M S
A pre-processor program should usually be used to generate the following data lines
Lines 7 to ip = 7 + nnp
nodal coordinates format(i5,2el5.8)
cord (maxnp, ndim) = coordinates of the nodal points Lines ip to ie = ip
-t nel
element connectivity format(1Oi5)
node (iel, icn) = array consisting of element numbers and nodal connectivity Lines ie to ib = ie
+ nbc
boundary conditions format(2i5,flO.O)
numbers of nodes where a boundary condition is given index to identify the prescribed degree of freedom (e.g. jbc = 1 the first component of velocity is given etc.) vbc ( ~ a x b ~ value ) of the prescribed boundary conditions
ibc (maxbc) jbc (maxbc)
=I
I-;.
As already mentioned, the present code corresponds to the solution of steadystate i i o n - ~ s o t h e ~ Navier-Stokes ~al equations in two-dimensional Cartesian domains by the continuous penalty method. As an example, we consider modifications required to extend the program to the solution of creeping (Stokes) non-isothermal flow in axisymmetric domains: To solve a Stokes flow problem by this program the inertia term in the elemental stiffness matrix should be eliminated. Multiplication of the density variable by zero enforces this conversion (this variable is identified in the program listing).
General structure of stiffness matrices derived for the model equations of Stokes Aow in (x,y ) and (r, z ) formulations (see Chapter 4) are compared.
~
~
~ SIMIJIATIONS ~ W T
-
EFINITE ~ ELEMENT PROGRAM
~ t l f f n e simtrix ~ corresponding to flow equations in (x,y ) formulation
to Aow equrztioiis in (r, z ) formulation ~ t i ~ f matrix n e ~ ~cor~espon~ing
paring systems (7.2) and (7.3) additional terms in the members of the stiffness matrix correspond~n~ to the axisymi~etric€ormu~dtionare idcntified. Note that the measure of integration in these teims is (r drdz).
edification of subroutine S ~ C ~ ~ V :
efine (r) in the program and find its value at the integration points. Find radial component of velocity (v,.) at the integration points.
CIRCULA'TORY FLOW IN A RECTANGULAR DOMALN
217
Calculate 1/2(v,2/r2)and add this vdue to the previously calculated value of the shear rate. tel,
odification of subroutine FLOW:
cfiiie (r) in the program and find its value at the integration points. The measure of integration should be multiplied by this factor. After evaluation of tlie terms of the stiffness matrix modify them according to the additional terms shown in system (7.3). Modification of subroutine ENERGY: The only requirement is to modify the measure of integratio~lsimilar to subroutine FLOW. Other temis remain unchanged (sec Chapter 4 for derivation of tlie working equations of the scheme). odification of subroutine ST Find radial component of velocity (vr> and ( r ) at the reduced integration points and calculate ijy/r. Include this teim in the calculation of pressure via the penalty relation. Modify the measure of integration multiplying it to (T). All ofthe described modifications are shown in the program listing. The rest of the subroutines will rernaiii the same and no other modification is necessary. owever, in practice a switch parameter can be defined in the program which by s value from 0 to 1 allows the user to select planar or axisymmetric rite formats used in the echo printing of input data and output files can also be modified to represent nodal coordinates, velocity and stress components iii an (r, z) system instead of the planar forms given in the program listing.
As an cxample of the application of PPVN,f we consider simulation of the circulatory flow of low-density polyethylene melt i II a rectangular domain of
0.05 in length and 0.01 rn width. The flow regime is generated by the imposition of a steady motion at the top surface. The prescribed boundary coliditions in this problem are as shown in Figure 7.2. Therefore at the side and bottom walls irichlet) boundary conditions are given, no temperature condit~onat the top wall is equivalent to setting zero thennal stress (i.e. teniperature ~radients)at this boundary.
218
COMPUTER SIMULATIONS - FINITE ELEMENT PROGRAM
vx= I , v,=o
vx= -1, v,,=o
v,=v,=o
vx=v>=o
T = 400 K
T=400K v,=v,=O; T=400K X
Figure 7.2 Boundary conditions
111
the sample simulation
Table 7.1 shows the structure of the input data file that is prepared according to the foiinat described in the previous section. Figures 7.3 and 7.4 show, respectively, the computed velocity and temperature fields, generated by PPVNf for this example.
Figure 7.3 The simulated velocity field
F i g ~ e7.4 The siniuhlcd temperature contours
CIRCULATORY FLOW IN A RECTANGULAR DOMAIN
219
TaMe 7.1 a
1 0.00000000E+00 0.00000000E+00 2 O.OOOOOOOOE+OO 0.625000000-03 3 0.000000003+00 0.125OOOOOE-02 4 0.00000000E+00 0.18750OOOE-02
7
NODAL COORDTNATES
"_,"_l_l__-_l,"____-_-ll_____ll I__---__l_---l-___-__--l---I-----.-
693 694 695 696
0.500000013-01 0.75000000E-C2 0 , 5 0 0 0 0 0 0 1 E - 0 1 0.8125OOOOE-02 0.500000013--01 0.875000003-02 0.50000001E-010.937500003-02
( m lines) ~
661 663
660 662
677 679
BOUNDARY CONDITIONS
NCOD = 3 corm
(NBC
lines)
puter using the Unix operating system PROGRAM PPVN
c C
I
14
I I
USED AS A WORK FILE TN THE SOLVER ROUTINE (SCRA'I'CHFILE)
50
I I
IMPUT DATA CHANNEL
c C C C
C C
C
1 OUTPUT FILE FOR UOCJMENTATIOZL I 15 I STORES SHAPE FUNC'TIONS 24" THEIR DERIVATIVES AT I 'FULL' INTEGRATION POINTS(SCRATCI3 FILE)
60
1
C C
16
I I
STORES SHAPE FUNCTIONS AND THE19 DERIVATIVES AT 'REDUCED'INTEGRATTON POINTS(SCRATCH FILE)
c
C C C FWLN VARIAbLES -- _ _C -- --_ C NOUh (MAXhL, 18) ELEMENT rOrSNECTTVITY ARRAY C CORD (MAXPJP, NDIM) NODAL COORDINATES ARRAY C AA { 18, 18) ELEMENT COEFFICfENl NATRICES; FLOW EQUArlONS C iin ( i8) ELEMENT LOAD VECTOR; FLOW EQUATIONS AE ( 9 , 9) ELEMENT COEFFICIENT MATRICES; ENERGY EOUATION C C RE ( 9) ELEMENT LOAD VECTOR, ENERGY EQUATION C VEL (MAXD>) NODAL VELOCITIES C NODAL TFMPARRTURES TEMP {MAXNP) STTFF (MAXAR) GLOBAL STIFFNESS MATRSX C P ( 9) SHAPE FLWCTIONS C C DEL ( % , 9 ) 1,OCAL DERIVA'IIVFS OF SHAPE FUNCTIONS C R ( 2, 9 ) GLOBAT, DERTVATIVES OF SHAPF FUNCTTONS C BC (MnxDF) BOTJNDARY CONDITIONS 4 R M Y VHEAT GENERATED VISCOS HEAT C ALPhA FACTOR TOR THE SELECTION OF SWEIiE 'TEEMS IN AA C EACT'OR FOR THE SELECTIOICI OF PENALTY IEFClYS IN AA c BETA NN'1 TOTAL NUMBER OF N o n u PoIwrs C TOTAL NUMBER OF ELEMENTS c NEL I_
SOURCE CODE OF PPVN.f C C
NBC NDIM NDF TOLV TOLT NJM FMAT1 RMAT2
C C C C C C
c
TOTAL NUNBER OF BOUNDARY CONDITIONS DIMENSIONS OF THE SOLUTION DOMAIN DEGREE O F FREEDOM PER NODE COiWERGENCF TOX,CF!ANc'E PARAKETER FOR VELOCITIES CONVERGENCE TOLERANCE PARAMETFR FOR TEMPERATURE NUhIBER OF 1NTEGRA"TON POTNTS PER ELEMENT MA'IEEKlAL PAWIETERS AT F'IJLL INTCGRATTON 2OTNTS MATERlAL PARAMETERS AT REDUCED INTEGRRTION POTNTS
~ ~ * * ~ * h h * * * , * X ~ X * * h k * * ) h * * h * h * * * * * k * * k h * A * * * ~ ~ ~ * ~ * * * * * * * * * * * ~ * * k * * ~ * * *
C C * * * STORAGE AIJJOCATTON C
PA~ETER(~EL=200,MAXNP=800,FIAXBN=1200,~BC=300) PAFUWIETER(MAXDF=2000,MAXST=18) C PARAMETERS SHOULD MATCH WJMBER OF ELEMENTS, XOUES, ETC. USED IN A PROBLEM C IMPTtTCIT DOUBLE PRECISION (A-H,O-Z) DINENSTON TITLE ( 80) DIMENSTON NODE (MAXEL, 18) ,PMIIT (MAXEL, 8 ) DIMENSION CORD (MAXNP, 2) DIMENSION NCOU (MHXDF ,BC (MAXDF ) DIMENSION IBC (MAXBC ) ,JRC (MAXBC ) ,VBC ( W B C DIMENSION VEL (MAXDF ) ,R1 (MAXDF ) ,TENP (MAXXP ) DIM&NSIOl' CLUMP (MAXNP ) , STRCS (MAXNP, 4) DIMENSION VET ( W D I ' ,TET (MAXNP DIMENSION SINV (MAXEIe, 13) ,NOPD (MAXRL, IS) ,RRSS (MAXbL.' ) DIMENSION AA ( 18, 18) 18) DIMENSION A E i 18, 18) ,RE ( DIMENSION XG i 3) ,CG ( 3) DIMENSlON P ( 3 ) , D E L ( 2, 9) , B ( 2 , 9) DIMENSION W4AT1 (MAXEL, 1 3 ) ,RMIIT2 (MAXEL, 1 3 )
C***
c'
CHARACTER*?O FILNAM
C
c * * * GLORAL
STLFFNESS MATRTX COMMON/ONE/ STiFF(20110,300)
C
DATA FILE'
1 C OPEN(UNT"=hO,FTZE='SO1;.OUT',i.ORM='FORMATTED',STATUS='NhW') C
c ***
INITIALIZE THE a K i i A Y s
C
OO 9111 ITL = 1,MAXEL DO 3111 IVL = 1,18 KODF (I'I'L,IVLI= NOPD (lTL,IVL) = 9111 CONTINUE DO 9 > 1 2 ITL = 1,l'UXXEL DO 9112 IVZ = 1.8 FMAT (ITL,TVL) = 9112 CONTINUE DO 9113 ITL = 1,MAXNP DO 9113 IVL 1,2 CORD (ITL.lVL)=
0 0
C.O
0.0
THE TNITIALIZATION STA TEMENI S MAY HE REDUNDANT IN SOME SYSTEMS
222
COMPlSTER SIMULATLQNS FINITE ELEMENT PROGRAM
9113 CONTINUE DO 9114 ITL = 1,MAXNP DO 9114 I V L = 1 , 4 STRES(I'TL,1VL)- 0.0 9114 CONTINUE DO 9 1 1 5 ITL = 1,MAXhL DO 91 15 IVL = 1'13 SlNV (ITL,IVL)=0.0 KMATl (ITL,IVL)= 0.0 RMAT2 (ITL,IVL)=0.0 9115 CONTlNUE DO 9116 ITL = 1,MAXDB NCOD (ITL) = 0 VEL ( I T L ) = 0.0 VET (I'I'L) = 0.0 R1 (ITL) 0.0 ac (ITL) = 0.0 YRRSS (ITL) = 0.0 9116 C O N T I N W DO 9117 ITL = 1,MAXNP CLUMP (TTL) = 0.0 TCT (ITL) = 0.0 TEMP J I T L ) = 0.0 91 17 CONTINUE DO 9 1 1 9 I T L = 1,MAXDl' 30 9119 LVL 1,MAXBN STIFF ( I W , , I T L ) = 0.0 9119 CONTI-WE DO 9121 ITL= 1,MAXBC (ITL) 0 IBC JBC (ITL) = 0 VBC (ITL) = 0.0 9121 CONTINUE I
C C'**
R.?R?kY
SUBSCRIPTS AND THEIR ULTIMATE LIMITS
C NDLM = 2
NUM
13
c (1
* * X * X * * * * * * k * h X * * * * * * * * * * * * X * * * * * * * * h * * * * * * * ~ * * * ~ ~ * * * * * * * * * * ~ * k * k ~ * * ~ * * ~ *
c C
c C C C
c
SET CONFROL P A W E T E R S (DEFAULlT VALUES ARE OVERWRITTEN BY INPUT DATA IF SPECTFKED) XCN NUMBER OF NODES PER ELEMENT NGAUS NUMBER. OF FULL I N T E G R A T l O N POlNTS MGAUS NUMBER OF KEDUCED INTEGRATlON POINTS NTFR MZiXIIWM NUMBER OF INTEGRATIONS FOR XON-NEWTONTAN CASE
C
c
* * * * X * X * * * * k X h * , * h * X x h * h h * * * * * * * * * * * * ~ * * * ~ * k * ~ * * * ~ * * * * * * ~ * * * * * * * ~ * * * * * * * * *
C
NCN = 9 NGALS 3 MGAUS = 7 NTER = 6
c C
* * * * * * * * * * * * PARAMMTERS FOR THE IDENTIFICATION OF PFNALTY
C 1.0 BETA = 0.0
ALPIIA =
TERMS
******
SOURCE CODE OF PPV3I.f C READ (50,1000) TITLE WRITE(60,2000) TTTLE C
C * - * ELENENT DESCRIPTION DATA C READ ( 5 0 , 1010) NCNR ,NGAUSR ,MGAUSR , ALPHAR , BETAR IRED = ALPHAR IF(NCNR .NF,.O ) NCN = N C m IF(TRFD .EQ.0 ) NUM = 4 IF(NCN .NE.4 ) GO TO 4780 NGAUS = 2 MGAUS =
NUM
1
5 4780 CONTINUE IF(NGAUSR.NE.0 ) NCAUS = NGAUSR TF(MGAUSR.NE.0 ) MGAUS = MGAUSR IF(NCAUSR.NE.0 ) ALPHA = ALPIiAR IF (MGAUSR.N E . 0 ) BETA BETAR WRITE(60,2010) NCN ,NGAUS ,MGAUS ,ALPHA ,BETA C C * * * MESH DATA, ROTJNDARY CONDITIONS AND TOLERANCE PARAMETERS =
C
R
W (50,1020 NNP ,NEL ,NBC
C
IF (NNP EQ.0 .OR.NNP .GT.MAXNP) GO TO 8000 IF (fiJEL EQ.O .OR.NEL .GT.PIAXEL)GO TO 8000 IF (NBC EQ.0 .OR.NBC .GT.M?SBC) GO TO 8000 WRITE (GO,2020 NNP ,NEL ,NEC C R E M (50,1030) TOLV ,TOLT
C
c
* * h ~ * * * * h h * X * * * * * * * * * * X * X h * * h * h * * * h * * * * * * * ~ * * * . k ~ ~ ~ k * ~ * * * * ~ ~ ~ ~ * * * * * * * * * * * * * * * * * *
C 1000 1010 1020 103 0 2000 1'
FORMAT(80Al) FORMnT(3IS,%F10.0) FOiiMnT(715) FORMAT (2Fl0.0) FORMAT(' ',5(/),' ',20X,60('*'),/'',2OX,'*',58X,'*',/
',20X,'*','A 'TWO-DIMENSIONAL,FINITE ELEMENT MODEL OF A ' , ',ZOX,'*',' NON-NEWTONTAN, NON-ISOTHEFNAL FLOW USING ' , 3'REDUCED',9X,'*',/'',20X,'*',' INTEGHATION / PENALTY FUNCTION ' , 4'H9THOn.',18X,'*',/'',20X,'*',58X,'.*',/'',20X,60('*')///,' 520X,80('--'),/' ',208,80A1,/'' , Z O X , 8 0 ( ' - ' ) , / / / ) 2010 FORMAT(' ',20X#3('['),'ELEMENT PRESCRIPTION ',10('.'),/ 125X,' NO.OF NODES PER ELEMENT =',IIO,/ 225X,'NO.OB INTEGRATION P O I N T S (*FULL*) =',110,/ 325X, 'NO.OF INF'EGKATION POINTS (*REDUCED*) : : I , 110,/ 425X,'SHEAR TERMS INTEGRATION FACTOR =',F15.4,/ 525X,'PENALTY TEKMS 1NTiX;RATION FACTOR =/ rF15.4,///) 2020 F O m T ( ' 0 ' , 2 0 X , 3 ( ' [ ' ) , ' MESH DATA PRESCRIPTION ' , ; a ( ' . ' ) , / 1%5X,'NO.OPNODAL POINTS =',I10,/ 225X, NO.OF ELaEMENTS =',110,/ 3258,'NO.OF NODAL BOUNDARY CONUITIONS = ' , s10,/ / / I 29X,'*',/'
I ,
C
c:
~ t * * . , : * * X * * r h h h * h k h * * * * * * h * * * h X * i * * * * * * * * * * * * * % * * * * * ' h * ~ * * * * * * * * *
C C
C
READ INPUT DATA FROM MAIN DATA FILE AND PREPARE ARRAYS F O R S O L U T I O N PROCESS
c
C
ikh**k*IX*h***fh**k**XY*Xt***Xkt*X**X*h*~************~~*~***~*****~***
c CALL CETMAl "EL, PMAT,50,GO,MAXEL,, RTCM) CALI, GETNOU (NNP, CORD,5 0,60,MAXNP,NDTM ) CALL GETELM(NEL,NCN,NODE,50,60,MAXEL) CALL GFTBCD(NBC,IBC,JEC,VBC,50,60,MAXBC) C (-
* * * * t * * * * * * * X k * * * * * * * * * n * * h * * * h * * * * * * * * * * * * * * * * * * , ~ * * * * * ~ * * * ~ * * * * ~ * * * * * ~ * * * ~ *
C C *INITIALIZE TEMPERATURE & SECOND 1WmlANII OF RAZE OF DEFORMATSON TFNSOR C DO 9996 IEL = 1 , K U E L DO 9996 LG - 1, NUM SINV (IEL,LG)= 0.250 9996 CONTlNUE DO 9997 SVEL= 1,MAXDF VEL (IVCL) = 0.0 9997 CONTINUF DO 9998 ITEM= 1 , N A X N P TEMPjI'I'EM)
-
RThM
9998 CONTlNUE C C*** MAIN SOLUTION LOOP C
DO 9999 I T h K = 1 ,NTER P R I N T k , 'ITER=',ITER C 'CJnI'I'E ( 60,?800) ITER 2800 FORMhT ( / / / ' 3 ( ' 1 ' ) , 1 5 , ' -I'H l T I E M T I O N ' , - 0 ( ' . ' ) / / ) C C CALCULATE NODAL VELOCITIES * * * h X * X * * k k X h k X * * * * * * X X * X * * k * * * * X * * * x * * X * C REWIND 15 REWIND 16 I ,
fl
NDF
=
2
NTOV = NDF * NNP NTRIX = NDF NCN CALL, CLEAhT ( R I ,EC ,NCOD ,NTOV ,MAXDF,MAXBN) CALL SETPRM (NNP ,NXL ,NCN ,NODE ,NDF ,MAXFL,YXST) CALL PUTECV (NNP ,NBC ,IRC ,JRC ,VBC ,NCOD ,MAXBC,MAXDF,BC) C
DO 5001 IFL=l,NEL
c CALC FLOW
1 2
3
(NODE , CORD , PPMT ,NDF ,W.XBN,NCOD , BC ,VEL ,R1 ,RRSS , T E W , N U M ,IEL ,ITER ,NEL ,NCW , S S W #NGAUS,MGAUS,P ,L)EL ,B ,ALPhA,BETA ,NTRIXrE/IAXEJ~,MAXNP,NOPD ,MAXST,PIAXBC ,XG ,DA ,NTOV ,IRED ,IBC ,JBC ,VBC ,RMATI,RMAT7)
4
tMAXDF,NDSM , A A
5
,NRC
C 5001 CONTlNUE
C C
h * x * a *
CHECK FOR CO&&VERGENCEx X * * X k r X * * * * h * + * * * *
c C 4 L L COYTOL
1(VEL,TEMP,ITER,NTOV,NNP,~P,MAXDF,ERROV,E~ROT,VET,TE?)
C IF(ERROV.LJT.TOCV.AI\ID.FRROT.I~T.TOLT) GO TO 8 8 8 8 8
SOURCE CODE OF PPVN.f C GO T O 88880 C 88888 CALL OUTPUT (NNP ,VEL ,TEMP ,MAXDF,WNP) C
CALL CLEAN(Rl,BC,NCOD,NTOV,NAXDF,MAXBN) C
GO TO 9000 C 88880 CONTINUE C
c
*h******hh*k**f*X*)****kX*Xht*h*****X******~~********************************~*
C CALL S E C I N V 1 (NEL ,NNP ,NCN ,NGPJJS,MGAUS ,NODE , SlNT ,CORD ,P , B 2 DEL , n A ,VEL ,P ~ PMAXEL, , MAXST,NDIM , IRED ,mr.i) C
*
C
CALCULATE NODAL TEMpEMTURE,? .
,
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C REWIND 15 REWIND 16 NDI? = 1 NTOV = NDF * NNP NTRIX= NDF * NCN CALL CLEAN (RI ,BC ,NCOD ,NTOV ,1LIAXDF,MBN) CALL SETPRM(NNJP ,NEL ,NCN ,NODE ,NDF ,MAXEL,MHXST) CALL PTJTBCT(NBC ,IBC , J B C ,VBC ,NCOD ,BC ,MAXBc,MAXDF) C DO 5002 IEL=l,NEL
C CALL ENERGY 1 (NODE, ,CORD ,PMAT ,NDF ,IWBN,NCOD ,EC ,TEMP ,VET , R R S S 2 ,R1 , I R E D ,XG ,NDIM ,DA , I E L ,NEL ,NCN ,NTOV ,NTJM 3 , I T E K ,NGAUS,MGAUS,P ,DEL ,B ,SINV ,NTRJX,MAXEL,MAXNP 4 ,I.WXST,MAXDF,MAXBC,IBC , J B C ,VBC ,NBC ,AE ,RE ,NOPD) R
L
5002 CONTINUE
C 9999 CONTINUE C 9000 CONTINUE C C C
* * * CALCULATION OF THF NODAI, PRESSURE
&
STRESS USING VARIATIONAL RECOVERY
CALL LUPTPM
1 (CLUMP, NNP, MAXNP,NEL ,NGAUS,P ,DEL , B ,MAXST,NODE,MAXEL,NCN) c
CALL STRESS 1 (NEL ,NNP ,NCN ,NGAUS,MGAUS,NODE,CORD ,P ,B ,DEL 2 ,VEL ,MAXNP,MAXEL,I.IAXST,EMAT1,RMAT2, IRED , S?'RES,CLUMP) C CLOSE (UNIT=E;O) STOP 8 0 0 0 CONTINUE C
C C
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
COMPUTER SIMI31,ATIONS - FINlTE ELEMENT PROGRAM
WRITE ( 60,29 9 5 ) 2995 FORMAT('0',10('['),' IXPUT DATA UNACCEPTABLE ',10('[')///) STOP
SOURCE CODE OF PPVN.f DEL8(1.,3)= (l.+H)/4 D E L ( 1 , 4 ) = --(l.+H)/4 DEL(2,l) ZL -(l.-G)/4 DEL(2,2) = -(l.+G)/4 DEL(2,3) = ( 1 .+G)/4 DEL(2,d) = (l.-G)/4 GO TO 30 9 IF(NCN.NE.8) GO TO 3.0 GG = G*G HH L- H"H GGH = GG*E GHH = G * m
c*** C 2.BI-QUADRATIC C***
10 G1=.5'*G* (G-1.) G2=1.-G*G G 3 = . 5*G* (G+I.1 H1=.5*H* (H-1.) H2=1.-H*H H3=.5*H* (Hcl.) P (1)=Gl*Rl P (2) =G2"Hl P (3) =G3*Hl P ( 4)=G3*H2 P ( 5 ) =G3*H3 P ( 6 )=G2 *H3 P (7)=C1*H3 P (8)=Gl*H2 p(9)42*~2 3GP:G--. 5
DG2=-.2. *G DG3=G+. 5
mi=H-.5 DH2:-2 .*H DH3LYHI- .5 DEL(l,l)=DG1*HX UEL(1,2)=DG%*Hl DEL(1,3)=DG3*H1 =DG3*H2 DEL (1,4) DEL (1,5)=DG3*H3 DEL (1,6) =DG2*H3 DEL(L,7)=DGl*H3 DEL ( 1,8) =DGl*H2 DEL (1,9) =UG2%2 DEI,(2,L) =G1*UHl DEL (2,2) =G2"DHl DEL ( 2 , 3 1 =G3 "DSII. DEL ( 2 , 4 ) =G3* D I E DEL ( 2 , s )=G3*DH3 DEL (2,6)=G2*DH3 DEL (2,7)=G1 *DW3 DEL(2,8)=Gl*DH2 DEL (2,9) =G2*DH2 30 CONTTNUE C
RETURN END C
NINE-NODED QUADRILATERAL
8
COMPUTER ~ 1 M U L A ~ ~- ~FINITE N S ELEMENT PROGRAM
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C SUBROUTIYE DERIV 1 (TFT. , IG ,JG , P ,DEL , B ,NCN , DA 2 ,CORD ,YAXEL,MAXNP,MAXST)
,CG
,NOP
C JACOBIAN Ob COORDINATES TRANSFORMATION & DERIVATIVES OF' THE SHAPE GLOBAL VARIARTZS IMPLICIT DDUBLF PRECISTON(A-H,O-ZI DIMENSION P ( 9 ) , E ( 2 , 9 ) , D E L ( 2 , 9 ) , C G ( 3 ) , C J ( 2 , 7 ) , C J I ( 2 , 2 ) DIMENSTON NOP(MAXhL,~ST),CORD(MAXNP,Z)
C***
c FUNCTIONS w m
C
DO 22 J=1,2 DO 22 L-l,2 GLSH- 0 . DO 21 I < = l , N C N NN=IABS(NOP(IEL,IO) 21 GASM=GLSH+DEL(J,K)*CORD(NN,L) 22 CJ(J,L)=GLSH DETJ=CJ(1,l)*CJ(2,2) -- CJ(3,2)"CJ(2,l) I F (DETJ) 29,33,29 13 -m1'r~(60.34) 34 FORMAT (1H , 2 2 H DFTJ=O PROGRAM HALTED) STOP
c
*t*
29 CJI(1,l) = CJ(2,2) / DETJ CJI(1,2) =-CJ(1,2) / DETJ CJI(2,L) =-CJ(2,1) / DZTJ CJI(2,2) = CJ(1,l) / DETJ
C *** DO 40 J = 1 , 2 DO 40 L=l,NCN B (J,I,) = a . o DO 40 h-1,2 40 B ( d , L ) = E(J,L) i- CJi(J,K) * DEL(K,L) DA = DETJ*CC (IG)*CG (SG) C RETURN END C C
C
SUBROUTINE SECINV 1 (NEL ,NNP ,NCN ,NCAUS, MGAUS,XODE , STNV ,CORD , P , B 2 ,DEL , DA ,VEL WPJP,MAXEL, YAXST, NDIM , IRED ,NUM) I
c IMPLICIT DOUBLE PRECISION(A-H,0 - Z ) C
C FUNCTION C - - - - - --C FTNDS THE SECOND IWARIANT OF FATE OF DEFORMATION AT INTEG,PATION C POINTS C DIMENSION '$EL (NNP , N D I M ) ,CORD (MAXNP, N D I M J DIMENSlON NODE (MAXEL,MAXST),SINV (MAXEL,NUM) DIMENSION P ( 9) ,DEL ( 2 , 9) DIMENSION B ( 2 , 9 )
c C
SOURCE CODE OF PPVN.E C REWIND 15 REWlND 16 DO 5000 IEL = 1 , NEL
c c
3**
C
TF(IRED.EQ.0) GO TO 5001
c
e
X * k
FULL INTEGRA'TIONpOI&-TS
X * X * * * h A * x X * * * * * X h f i * * * * k * ~ ~ * ~ * k X ~ k ~ * X ~ ~ * X *
C LG = 0 DO 5010 IC = 1 ,NGAUS DO 5010 JG = 1 ,XIcAUS LG = LG+I REriD (15) IIEL,lIG,JJG,P,DEL,E,DA x1 0.0 U1 0.0 U11 = 0.0 U12 = 0.0 U21 = 0.0 U 2 3 = 0.0 30 5020 TCN = 1 , N ~ N JCN = TABS(NODS(iEL,ICN))
X I = X I + P(ICN)TORD(JCN.I) U1 = U1 + P ~ I C ~ ~ * C O ~ D ( ~ ~ ~ , ~ ~
DO LOOP
IN THIS c C C
* * * COMPONENTS
OF THE RATE OF DEFORMATION TENSOR
U11 = U11 + U12 = U12 + U21 = U21 + U22 = U22 + 5020
B(l,ICN)k VEL(JCX,l) B(2,ICN)" VEL(JCN,l) B(l,TCN)*VEL(JCN,2) B(2,1CN)* VEL(JCN,2)
CONTINUE
c C * * * SECOND SNVARJHNT OE THE RATE OF DEFORMATION TENSOR
c SlNV(IEL,LG) = 0.125*((U11+U11)*(Ull+Ull)t 1 (U12+U21)= ( ; S l / ' + U 2 1 ) + 2 (U21+U12)* (U21+Ul?)+ 3 (u22+u22j*(u77+u22)) C 5010 CON? iNUE C 5001 CONTINUE
c
C * * * RF,T)UCED INTEGRATION POINTS
* * * * * C h * R * * * X k h * * K X * * X ~ ~ * * * * ~ ~i l k * * * * *
C
I:F(IRED
E Q . 0 ) LG = 0
DO 6010 IG DO 6010 JG
rx;
1 ,MGAUS ,MGAUS = I + LG READ (16) IZEL,IIG,C J G , P,DEL,R , DA = I
X1, = 0.0 U1 = 0.0 U11 = 0.0 U12 = 0.0 U21 = 0.0 U22 = 0.0 DO 6023 ICN - 1 ,NCN JCN = IABS (NODE (IEL,ICN))
FOR R,Z OPTION H N D X1 & IJ1 AS X l = XI + P(ICN)*CORD(JCN,I) U1 = 171 + P(ICN)*CORD(JCN,l)
IN THIS C C
lr**
DO LOOP
COMPONENTS OF THE RATE OF DCFOF3VATION TENSOR
C 311 = U11 + B(l,ICN)* VEL(JCN,l) IT12 = U12 + B(2,TCN)* VEL(JCN,l)
U71 = U 2 1 + B(1,ICN)" VEL(JCN,2) U22 U22 + B(2,ICN)" VEL(JCN,2) 6023 COIQTINUE C C * * * SECOND TNVARIANT OF TIE RATE OF DEFORMAZ'ION TENSOR C SINV(IEL,I,G)= 0.125*((U11+U11)*IUll+U11)4 1 (U12+U21)* (U12+U21)+ 2 (U21kU12)* (IT21+U12j + 3 (U22+U22) * (U22+U22)j 6010 CONTJNUE C 5000 CONTINUE
r REl'URN
END C
c
* * * * k h * * i h * * * * * * h * * * ~ ~ ~ * * * * * * * * * * * * * * ~ * * * * * ~ * * * h * * * k * * ~ * * * * * ~ * * * * * * * *
n
L
SUBROUTINL FLOW 1 (NODE ,CORD ,PMAT , N D F ,MAXSN,NCOD , B C ,VEL ,R1 ,RRSS 2 ,TLMP NUM , IEL ,TTER ,NEL ,NCN , SINV ,NGAUS,MGAUS,P 3 ,DEL ,U ,ATfiPHA, BETA ,N'l'RIX,PIAXEL,MAXNP,NOPD,MAXS'T 4 ,MAXBC, MEXDF, N D I M AA ,XG ,DA ,NTOTI ,TRED ,TBC ,JBC 5 ,vE(C ,NBC ,RMFITl,RMAT2) I
I
c C"
* * SOLUTION OF THE GENblUl1,IZEONAVIER--S?OKES EQUATION
c JMPLICTT DOUBLE PKEClSION(A-H,O-Z)
c DIMENSION NODE (YAXEL,MAXST),PMAT (MAXEL, 8 ) DIMENSION COED (YUAXNP, NDTM) DIMENSION NCOD (I'CAXDF) ,BC (MAXDF) , S I N V (MAXEL,NUM) DTMENSION VFIi (MAXNP,N D I N ) ,K1 ( W O k ) ,TCIQ (MAXNP) DTMFNSION AA ( 18, i8),KR ( 18) DIMENSTON XG ( 3) ,CG ( 3 ) DIMhNSIOAV X ( 2) ,V ( 2)
SOURCE CODE OF PPVN.f DIMJ3NS ION BTCId (
7) ,HH ( 2 ) DIMENSION P ( 9 ) ,DEL ( 2 , 9 ) , B ( 2, 9) DIMENSION I B C (MAXBC) ,JBC (MAXBC) , VBC (MAXBC) DIMENSION RMATl(MAXEL, 13),RMATZ(MAXEL, 13) DIMENSION NOPD (MAXEL,MAXST),RRSS (MAXDF) COMMON/ONE/ STIFF(2000,300)
C
c
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C
5600
RVISC = PMAT'(IEL,l) RPLAM = PMAT(IEL,2) POWER = PMAT (IEL,3 ) RTEM = PMnT(IEL,4) TCO = PMAT(IEL,5) KODEN = PMAT (IEL,6) DO 5603 IDF = 1,NTRIX = 0.0 KR(IDF) DO 5 6 0 0 JDF = I,NTRIX AAJIDF,JDF)= 0 . 0 CONTTNUE
R
L
C
h**
C IF(IRED.EQ.0) GO TO 5700
c c ***
'FULL'
jrNTE.mrl(JN
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C CALL GAUSSP (NGAUS,XG,CG) LG=O DO 100 IG=1,NGAiTS G = XGIIG) DO 100 JG=l,NGAUS H = XG(JC) LC=LG+1 IF(ITEK.GT.1) GO TO 9996 CALL SFIAPE (G,H, P,DEL,NCN) CALL UER.IV 1 (IDL,IG,ZG, P IDEL,U,MCM, DA, CG,NODE,CORD,MAXEL,MAXNP, MAXST) WRITE(15) IEL ,IG ,JC ,P,DEL,U,DA GO I 0 9995 9996 READ (15) IIEL,IIG,JJG,P,DEL,B , DA C 9995 CONTINUE C START A LOOP AND C * * * UPDATING VISCOSI'I'Y EIND X I (SIMILAR C
STEMP = 0.0 DO 5333 IP = 1,NCN JP = .CABS(NODE(IEL,IP)) ST'EMP = STfTP + TEMP(JP) * P(1P) 5 3 3 3 CONTIPJUE EPSTI = 1.D-10 SRATE = SINV(IEL,LG) TF(SRATE.L'f.EPS1I)SRATE = EPSIT CA1218 VISCA(RVISC,POWER,\IlSC, SKATE,STENP,RTEM,TCO) C C * * * CALCULA'I'EVISCOSITY-DEPENDENT PENALTY PARKMEThK C PIAM = RPLAM * V I S C
C rnT1(lEL,LG) = VISC RIVLAT2(lELtLG)= PLAM
C C C
***
F.OM IXDEX
DO 1 9 T=I,NCN PICN = P (I) EICN(I)= R(1,I) BICN(2)= E 2 I PRVB Jll = I J12 = I + NCN C
C * * * COIsUMcJ INDEX C
DO 19 J=l,NCN J21 = J J22 = LT
+ NCN
c
c
A * +
STIFFNESS MKTRLX
*k****i*****h**hh*t**C********XX****************~~kk***
C AA(Jll,J21) = AA(J11,J21) 1 + ALPHA"PKV3" (V(1)*R ( J ,J)+ V ( 2 ) *B (2,J ) I DA 7 + ALPHAhVZSt*(2.0*B(I,~)~B(l,J)+E(2,I)*B(2,J))*DA 3 + BETA *PIAM* R(L,I)*H(i,J) 'DA AA(J11,522) = AA(Jll,J22) 1 + AT,PKA*VISC* B ( 2 , I ) *B(l,J) "DA 2 + BETA *PLAM* E(l,i)*B(2,J)*DA An(JL2,J21) = AA(512,321) 1 + ALPHA*VlSC* B(l,I)*B(2,J) *DA 2 + BETA *PIARM* B(2,I)*B(I,J) "UA BA(Jl2,522) = U(J12,J22) 1 + ALPIIA*PRVB* (V(1)k B ( l , J)iV(2)" B ( 2 , J) * DA + AIlPH9*VISC*(2.0*E( 2 , I)*E( 2 , J ) +B (1,I)" 3 (1,J)) *DA 2 3 + BETA *PLAM* E(2,I)*E(2,J)*DA 19
FOR R,ZOPTION MODIFY AS
CONTTWE
c
AA(J11.321) = AA(J11.521) + BETA * P L A M ~ ( [ ~ ( ~ , I ~ ~ P ( ~ ) 100 CONTINUE X(1) + B ( l , J ~ ~ P ( I ) / X (+l )P ( t ) * P ( ~ )I)*+2)DA ~( C AA(JI 1,522) = AA(JIIJ22) -t BETA8 P L A ~ * ~ ( l ) * ~ ( Z , J ) / 5700 CONTINUE X( l)*DA c AA(JI2,J21) = AA(J12J21) + BETA* Pl,A~*P(J)*B(Z,I)/ C * * * 'REDCCED' INTEGEW.TION * * X(l)*DA C
IF(1RED .EQ.O) LG = 0 CAM GAUSSP(MC-AUS,XG,CG) DO 200 IG=l ,MGAUS G - XG(IG) DO 200 JG=l,$lGAUS H = XG(JG) LG=LG
I
I
IF(lTER.G'l'.l)GO TO 9994 CALL SHAPE ( G , H,P IDEL,NCN) CALL DERIV NAXEL,MAXNP,MhXST) 1 (IEL,IG,LTG, P I DEL,R , NCIil, DA CG, NODE,CO-W, WRITE(16) IEL ,IG ,JG ,P,DEL,E,DA GO TO 9 9 9 3 9994 READ (16) I L E L , IIG,JJG,P I DEL,B,DA I
SOURCE CODE OF PPVN.f C 9993 CONTTNUE C C * * * UPDATING V I S C O S l ' T Y C STEMP = 0.0 DO 3334 TP = 1,NCN FOR R,% OPTION JP = TABS (NODE ( T E L , IF)) START A L,OOP A;\ID STEMP = STEMP + TEMP(5P) * P(IP) FIND X I (SIMILAR 3334 COWrINUE TO SECINV) THEN YPSII = l.D-10 MODIFY D A AS SRATE = SINV (TEL,LG) DA = DA"X(1) TF(SE?ATE.LT.SPSJI) SRATf = '3PSII CALL VISGA(RVISC,POWER,VISC, SRATE,STEMP,RTEM,TCO) C C **' CALCULA'I'E VISCOSITY-DEPEN3EN'I'PENALTY PARAMETER
C PLAM =
nmm *
VISC
C KMA'l'1 (IEL, LGI = VISC RMAT2 (IET,,IG] = PL,AM
c
SHOULD BE MULTIPLIED BY ZERO FOR STOKES FLOW CALCULATIONS
C * * * ROW INDEX
G DO 20 I-1,NCN PICN - P (I) BICN(lI= B(3,T) BICN(2)= B ( 2 . I ) \ PRVB = RODEN * PICN Jll = I J12 = 1 t MCN C
C * * * COLUMN LMDEX DO 20 J=1,NCN J21 = J
522 J+NCN C C * * * STIFFNESS MATRTX FOR 'REDUCED' INTEGRATION * * * * = * * * * * * + I * * * * * * * * * C AA(J11,321) = A A ( J 1 1 , J2l) 1 + ( 1 .&ALPHA) *PHVB* ( V ( 1 ) *B(1,J) +V(2)' R ( 2 , J ) ) * DA + (1.@-ALPHA)* V I S C ' (2.O"B(1,I)*B (1,J) +B (2,I)* B ( 2 , J) * DA 2 3 + (1.0-BETA)*PLAN* B(l,T)*B(l,J) "DA AA(J11,322) = AA(JII,J32) 1 i (l.O-ALPHAI*VISC*B(L,I)"B(l,J) *DA 2 + (1.0-BETA) *PLAN* B(l,I)*B(2,J) *DA AA(J12,;21) = AA(JlZ.J21/ 1 * (1.0-ACPIIA]*VXSC* B (1,I)* R ( 2 , J 1 *UA 2 t (1.0-BETA) *PLAM* 5(2,lI*B(l,Jl "DA A A ( J 1 2 , J22)=AA (Jl2, J221 + [ I.0-ALPHA)* PRVLI" (V( 1)* B ( 1,J)+V ( 2 * B ( 2,J)) * 1 DA + (l.O--ALPKA) *VISC* (2.O*B(2 T ] *R (2,J j + B ( 1,I)*B (1,J ) 1 *DA 2 3 + (1.0-BETA)*PLAMA B(2,3)*B(2,J)*DA I
20
200
CONTIIWE CONTTNUE
MODIFICATIONS AS THE FULL INTEGRATION IJSING (1.0-%TA)
COMPUTER SIMULRTIONS
-
FINITE ELEMENT PROGRAM
CAIJL SOLVER
1 (AA ,RR , IEL ,NODE ,NCN , IBC ,3BC , VBC ,NBC , RC , NTOV 2,NCOD ,NTKIX,NEL ,VEI, ,R1 ,MAXEL,MAXDF,MAXST,MAXBC,MflXBN,NDF 3 ,NOPD ,RRSS) C
RETUKN
END c
c
C C
***x******************************f*****************************~~~~**~**~
SUBROUTINE ENERGY 1 (NODE ,CORD ,PMAl' ,NDF ,MAXBN,NCOD ,BC ,TEMP ,YEL ,RRSS 2 , R.! , IRED ,XG , N D l M , DA , IEL ,NET,,NCN ,NTOV ,NUM 3 ,TTER ,NCAUS,MGAUS,P ,DEL ,B , S T W ,NTRIX,M?.XEL,MPXNP 4 ,MAXST,MAXDF,MAXBC,IBC,JBC ,VBC ,NBC ,AE ,RE ,NOPD) 1-
C*"*
SOLUTION OF THE ENERGY EQUATION
i
IMPLICIT DOUBLE PKEClSION(A-H,O-Z) DIMENSTON DIMENSION DIMENSION DIMENSION DIMENSION DIMFNSION DTIMENSION DIMENSION DIMENSTON DIMENSION DIMENSION
NODE (PAXEL,MAXST), CORD (MAXNP, NDIM) NCOD (MAXDF) ,BC (MAXDF) ,SINV (MAXEL, NIM) TEMP (MAXNP) ,R1 (MAXDF) .VEL (MAXNP, NDTM) AE ( 1 8 , 18),RE ( 18) XG ( 3) P ( 9) ,DEL ( 2, 9),B ( 2 , 9) X ( 2) ,V ( 2) BICh ( 2 ) ,BJCN ( 2 ) HH ( 2) ,HD!2) ,PMAT (MBXEL, 8 ) IBC (MnxBC) ,JBC (MAXBC) ,VBC (MAXBC) NOPD (MAXEL,MAXSTI, RRSS (MAXDF)
C COMMON/ONE/ STTFF(2000,300) c
L.
C C
****t****************************i*****~********~****~****************~~**
RVTSC = PMAT(TE1,l) QPLAM = PMAT (IEL,2) POWER = PMAT (?.EL,3 )
KTEM
-
PMAT(IEL,4)
= PMAT(TFL,5) RODEN = PMAT (TEL,6 ) TCO
C C * * * BASlC ELEMENT LOOP * * * * * * * * * * * * * * * * i* * ix * * " x * * * * * * * * x * * * * * * * * * * 9. * * .*
c DO 490C lTRIX = 1 ,NTKIX RE(ITR1X) = 0.0 DO 4900 JTRIX . 1 ,NTRIX AE (ITRIX, JTRIX) = 0.0 8900 C
CONTIXUE
* * * NUMERICAL INTEGRATION
C MO = IVGAUS ZFiIRED .EO.0 ) MO = MGAUS LG = 0 DO 5010 IG = 1 ,MO DO 5010 JG = 1 ,MO LG = LG +1
SOURCE CODE OF PPVN.f C C SHAPE FUNCTTONS & THEIR CAKT'ESIHPJ DERIVATIVES ARE READ FROM A
WORK FILE
C IF(IRED .EQ.1) READ (15) IIEL,IIG,JJG,P,DEL,B,DA 1F(IMD .EQ.O) READ (1.6) IIEL,IIG,JJG,P,DEL,B,DA C
C * * * UPDATING VISCOSITY C STEMP = 0.0 DO 3337 IP = 1,NCN JP = IABS (NODE(IEL,IP)) STEMP = STEMP + TEMP (JP) * P (IP) 3337 CONTINUE EPSIl = 1.0-10 SXATE = STNV(IEL,I-G) IF(SRATE.JdT.EPSII) SRATE = EPSII C CALL VISCA(RVISC,POWER,VISC,SRATE,STEMP,RTEM,TCO) CP =PMAT(IEL,7) CONDKzPMAT (TET,, 8) C C * * * CALCULATE VISCOUS HEAT DISSIPATION C VHEAT = 4. * 'JISC * SRATE C C * * * COEFFICIENTS EVALIJATED AT THE INTEGRATION POINTS C DO 5030 IDF = 1 , 2 =.: 0.0 X(IDF) V(1DF) = 0.0 HU(1DF) = 0.0 5030 CONTINUE DO 5040 ZCN .= 1 ,NCN JCN = IABS(NODE(TEL,ICN)1 DO 5040 IDF = 1 , 2 = X(1DF) + P(ICN)*COKD(JCN,IDF) X(LDF) = V(1DE') + P(ZCN)*VEL (JCN,IDF) V(1DF) DO 5040 JDF = 1 , 2 HD(1DF) = HD(IDF)+ 2.0*DEL(JDF,ICN)*CORL)(JCN,IDF) 5040 CONTINUE C * * * STREAMLINE UPWINDING - CALCULATION OF UPWINDING PARAMETER C HDD = SQRT(€iD(t)**2 + HD(2)**2)
c *** 1
AVV lP(AW RW
CONST C
= SQRT( V ( 1 ) * * 2 + V ( 2 ) ' * 2 )
.LT. 1.D-10) = l.D-10 = 0.5 * EDD / AT$
FIND (X1) AT THE INTEGRATION POINTS AND MODIFY DA (SIMILAR TO SUBROUTINE SLOW)
DO 6000 ICN = 1 ,NCN PLCN = P (ICN) BICN(1)= B(1,TCN) BICN ( 7 ) = B (2,ICN) C * * * CALCULATE UPWTNDED WEIGHT FUNCTION DO 4 8 4 0 JDF = 1 , 2 PICN = PICN + V(JDF)xCONST*BICN(JDF) 4850 CONTTNUE C
235
COMPUTER SIMLJLATIONS - FINITE ELEMENT PROGRAM
236
C ' * * ROW INDEX C
IR = ICN
c * * * SOURCE FUNCTION
C C
RE(1R)
= KE(IR)
+ P(ICN)*VHEAT*DA
C DO 6010 JCN = 1 ,NCN PJCN = P ( J C N ) BJCN(lJ= B(1,JCN) BJCN ( 2 ) = B ( 2 , JCN)
c C * * * COLUMN lNDEX
C IC = JCN C DO GO20 MDF
-
1 ,2
C
* * * DTAGONAL ENTRY * * * CONVECTION AND DIFFUSION TERMS
C
c AE (IR,IC) - AE(IR.IC) + RQDEN*CP*PICN*V(MDFJ*BJCN(MUF)*DA + CONDK*BICN(MDF)*BJCN(I%DL.') *DA 1
C CONTINUE
GO20
C CQNTTNUE
bOlO
6 O O C CONTINdE
C 5 0 1 0 C-ONTINUE
C C C
A * x
ASSEMBL>EAND SOLVE
CALL SOLVSR l(AE ,RE ,IEL ,NODE ,NCN ,IBC ,JBC ,VBC ,NBC ,BC ,NTOV 2,NCOD ,NTRIX,NEL ,TEMP ,RI , M A X E L , M A X U F , ~ S T , ~ L 3 C , M A X B N , N D F 3,NOPD , RRSS)
c
C * * * END OF BASIC ELEMENT Loop
h * * X * * k h h X * * X * X * h * * * * * * * X * * * * * * * * X * * * * X k *
C C
RETURN
END C C
* * * * * 1 * * * * + X f X X * * * * * h * * * * * ~ * * * h * * k * h * k k k * * ~ * * * * ~ k * ~ * ~ k * * * ~ * ~ * ~ * * * * * * * * *
C
SUBROUTTNE STRESS 1 (NEL ,NNP ,NCN ,NGAUS,MGAUS,NODE,CORD ,P ,B ,DEI 2 ,17EL .MAXNP,M?iXEL,MAXST,RMATl,RMAT2,IRED ,STRES,CLUMP) C IMPIjICIT DOUBIxE PRECISIONJA-H,OL)
C C FUNCTION
C - - -- - C CALCULATES PRESSURE AND STRESS COMPONENTS AT 'REDUCED', INTEGKATLON c POINTS AND WRITES INTO o w w r FILE. C VARIATIONAL RECOVERY OF PRESSURE, AND STRESS COMPONENTS AT NODES C I
SOURCE CODE OF PPVN,f NODE IMAXEL,MAXSI') ,CORD ( W N P , 2) RMAT1 (MAXEL, 13) , KMAT2 (MAXEL, 13 ) P ( 9) ,DEL ( 2, 9) R ( 2, 9) DIMIQ?STON STRES (NNP , 4 ) ,CLUMP(MAXNP)
DIMENSION DIMENSION DIMENSION DIMENSION C
c
*******************kr******ihXr*r*kXfi***~*~**************~*~********~**~*~***
C
no
REWIND 16 4990 INP = I , ~ P
DO 4990 1 C P = 1 , 4 STRES IINP,ICP) = 0.0 4990 CONTINUE DO 5000 IEL = 1 ,NEL NG = 0 DO 6010 iG - 1 ,MGAUS DO 6010 JG = 1 ,MGATJS NG = 1 + NG READ (16) JEL,KG,LG, P , DEL,B,DA IFG = NG +ZRF.D* (NGAUS*": RTJISC=RMATl(IEL,IFG) RPLAM=RbfAT2(IEL,IFG) xc1 = 0.0 XG2 = 0.0 FILE; IT IS ALREADY U11 0.0 MODIFIED IF YOU ARE IJSTNG R.2 U12 = 0.0 U21 = 0.0 O€'TIC)N U22 = 0.0 DO 6020 ICN = 1 ,MCN JCN = IABS(NODE(IEL,ICN)) XG- = X G I + l'(ICN)*COKD(JCN,1) XGZ = XG2 + P(ICN)*CORD(JCN,2) U11 = U11 + €3(1,ICN)*VEL(JCN,l) YJ12 = U12 1 B(2,ICN)*VEL(JCN,1) U21 = U21 + B(l,ICN)*VEL(JCN,2) L'22 = U22 4 B(2,ICNIXVEL(JCN,2) 6020 CONTINUE C C * * * CAQTESIAN COMPONENTS OF THE STRESS TENSOR 2
\
c PRES =:-RPLAM* (U11 + U22) SD11 = 2.0 *RVISC * U11 SD12 : : RVISC * (U12 4- U 2 1 ) SD22 -: 2.0 cRVISC U22 C
PRES = PRES
-
RPLAM&VR
S11 =-PRES i SD11 S12 = SD12 522 =-PRES + SD22 C C
*
CIGCLlLATh PRESSURE k STRESS AT NODAL POINTS
C
1 1
DO 6500 ICN = 1 ,NCN JCN = lABS(NODE(IEL,ICW)) STRES(JCN,l)- STRES(JCN,1) + P(TCW)*PRES *DA / CLUMP(JCN) STRES(JCN,2)=STRFS(JCU,2) + P(ICN)*S11 *DA / CLLJP(JCN)
* ( V A K I A T I O N A I ~RECOVhRY) *
237
COMPUTER SlMULATIONS - FINITE ELEMENT PROGRAM STRES(JCN,3)= STRES(JCN,3) i P(ICN)*S22 *DA / CLUMP(JCN) STRES(JCN,4)= STRES(JCN,&) 1 + P(ICN)*Si2 "DA / CLUMP(JCN) 6500 CONTINUE 6010 CONTINUE
1
C
5000 CONTUWE
c
kX************h***X*************hX********"*****k***"*~**"************
WRITE (60 2100) 2100 PORMAT('1',' ***VARLATIONAL RECOVERY***',/ I/' NODE',llX,'PRES',12X,'S11',12X,'S2%',12X.'S12') = 1,4),TNP= 1,NnrP) WRITE(60,2110) (INP,(STRES(INP,ICP),ICP 2110 FORMAT(15.4EL5.4) C
STORE 'THE RESULTS FOR POST-PROCESSING
RETURN END C
SUBROUTINE LUMPM 1(CLUMP,NNP ,MAXNP,NEL ,NGAUS,P ,DEL ,Y ,MAXST,NODG ,MAXEL,NCN) IMPLICIT DOUBLE PRECISION(A-H, 0 - 2 ) DIMENSION R ( 2, 9) ,DEL ( 2, 9) ,P DIMENSION CLUMP(MAXNP) DIMENSION NODE (MAXEL,MAXST) DO 5000 INP - 1 ,NNP CLUMP (INP)= 0.0 5000 CONTINUE REWIND 15
c
(
9)
****r***i**h****h*X*****X*Xh*r*rX******X*k~****~*kk*****~**~******~***
DO 5010 IEL 1 ,NEL DO 5020 IG = 1 ,NGAUS DO 5020 JG = 1 ,NGAUS REXR (15) JEL ,KG ,LG ,P ,DEL ,B ,DA DO 5030 ICN = 1 ,NCN ww = 0.0 DO 5040 JCN = 1 ,NCN bv%J = IW + P(1CN)*P(JCN)"DA 5040 CONTIKUE LNP = IABS(NODE(IEL,ICN)) =CLUMP(INP) + WW CLUMP ( INP) 5030 CONTTNUE 5020 CONTINUE 5010 CONTINUE RETURN END
C C n
* * * * * * * * * * * * * t * k * * k * * * * * * * X X * * * * * * * * * * X * * * * * * * * * ~ ~ ~ * * * * ~ * * * * * * * * * * * * * *
SOURCE CODE OF' PPVN.f IMPLICIT DOUBLE PRECISZON(A-H,O-Z) C C**+ THTS SUBROUTINE ASSEMBLES AND SOLVES GLOBAL STIFPNESS EQUATIONS C
c
x * * * h * k h * * h % i r * X k * * * * h x X * * * * * * * X * X * * * * * * * * * * ~ * k * * * * * * ~ ~ * * ~ * * ~ * * ~ * * * * * * * * * * *
C
ARGWIENTS
C
-
C C C C C
C C
C C C
C
C C C (2
---- - - -
RELST (MnxST, MAXST) ELEMENI' COEFFICIENT MATRICES ELEMENT LOAD VECTOR RELRH (MHXST) NOP (MAXEL,WZXST)ELEMENT CONNECTIVITY RSOLN (MAXDF) NODAL VELOCITIES RRHS (MAXDF) GLOBAL LOAD VECTOK STIFF (MAXAR) GLOBAL STIFFNESS MATRIX ARKAY FOR SORTING BOUNDARY CONDITIONS RBC (MAXDF) NE TOTAL NUMBER OF F'.I,EMENTS IN THE MESH TRC (MHXBC) ARRAY FOR BOUNDARY NODES JBC (MAXBC) ARRAY FOR DEGREES OE FREEDOM CORRESPONDING TO A BOUNDARY CONDITION VBC (MAXBC) ARRAY FOR BOUNDARY CONDITION VATJUES **************f*t***tr*****f************~*******~**********~**~~****~*~***
C DIMENSION DIMENSION DIMENSION DIMENSION DIMFNSTON DIMENSION DIMENSION DIMENSION DIMENSION DIMENSION
RELST (MAXST,KAXST), R E L R I I (MAST) NOP (WEL,MAXST) RRHS (MAXDF) RSOLN ( M n x D F ) NCOD (MAXDF) nBc ( MAXDF ) IBC (MAXBC) JBC (MAXBC) VRC (wax) NOPD (MAXEL,MAXST) , QRSS (NAXDF)
C COMMON/ONE/ STIFF(2000,300) C C
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C TF(MM .EQ. 1) REWIND
14
WRITE (14) KELRh C C I E ' ( M M .LT. NE) RETUXW
C DO 5000 I=l,NE DO 5000 J=l,NTKIX NOPD (I, J )=NOP(I,.T) 5000 CONTINUE C
REWIND 14 C
CALL MODIFY 1 (NOP ,NE ,NCN ,IBC ,JBC ,RW,NBC,VBC,NCOD,NTOV, W E L ,MAXDF,MAXST,MAXBC,NDF) 2 C
CALL BANDWE 1 (NOP ,NE
,IBAND,NTRIX,MAXST,MAXEL)
C DO 5010 IMM=l,NE
239
~ O ~ ~ U TSIMLJLATIQNS E R - FINITE EIXMENT PROGRAM C READ ( 14 ) RELRH n
L
CALL ASSEMB 1 (IBAND,NTRTX, IMN,NOP,NTOV,RELRH , RELST, Rfih'S,MAXEL,PTAXST) C
5010
CONTINUE
c CALL SOLVE 1 (RRHS,MAXBN,RSOLN, IB~UD,NTOV,NCOD,RBC,~DF,NDF, RRSS) C DO 5020 I=1,NE DO 5020 J=l,NTRTX NOP (I, J)=NOPD (I,J) 5020 CONTINUE
ASSEMBLES THE ELEMENTAL STIFFNESS MATRTCES DIMENSION F.ELAT (W?.WXST, MAXST) ,RELRH (MAXST) DIMENSION RRHS (NTOV ) DTMENSION NOP (MAXEL,MAXST) CONFIONIONEI STIFF (2000,300) t**************************************~**************~***~**
C c * * CALLCULIATEHALF BANDWIDTF PARAMETERS
C I H B W l = (1EAND-i 1)/ 2
t
LOOP THROUGH ROWS OF ELEMENT STIFFNESS MATRICES
C***
C
DO 5000 ITRIX=
1
,NTRIX ,ITRIX)
IROW =NOP(MM C C"**
ASSEMBLE RIGHT-HAND SIDE
c RRHS (IROW) = RRES (IROW) + PELRH ( ITRIX) C C***
IcOOP THROUGH COLUMNS OF ELEMENT STIFFNESS MATRICES
C DO 5000 J T R I X =
JCOLM=NOP(MFr
1
,NTRIX ,;TRIX)
C
C*** ASSEMBLE GLOBAL STIFFNESS MATRIX IN A BALVDhD FORM
c 3BAND=JCOLM-IKO~+IHBWl
SOIJRCE CODE OF 1 T V N . f STIFF(IROW,JISAND) = STIFF(IROW,JBAED) + RELST(ITRXX,JTRIX) 5000 CONTIWE
c RETURN END C *i********************h*i***********************************************
c SUBROUTINE BANDWD 1 (NOP ,NE ,IBAm,NTRTX,MAXST,MAXEL) C
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
c FUNCTTON
C
c -- ---- --
FINDS THE ilW(IMUP1 BANDWIDTH IN THE ASSEBIBLED GLtOAZIT, MATRIX
C
C
DIMENSION NOP (MnxEL,MAXST) C
c
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C DO 5000 MM=l,NE NPMAX=NOP (MM,1) NPMIN=NOP(MM,l) DO 5001 JTRIX=2,NTRIX IF ( N O P (MM, JTRIX) . GT .NPMAX) N€'MAX=NOP (MM, J T R I X ) IF (NOP(MM, J T X I X ) .L?'.NPMIN) NPMIN=NOP(MM, JT'NIX) 5001 CONTINUE NDELTz:NPMAX-NPNTN MBAND=:2*NDELT+l IF(MX . E Q . I) IBAND=MBAN3 IF(IBAND .LT.MBAND) IBAND=MBAND 5000 CONTINUE WRTTF,(60,2000)IBAND 2000 FORPlnT(1H , 7 H IBMgD=,I5)
c RETURN
END C
c
***~hXc.~********hh**~**r,k***t*****h***********.k*****~*********~********,**.~***
C SUBR-OUTINE SOLVE
1
XBAIUD,NTOV,NCOD,RBC,MAXDF,NDF, RRSS) (RRHS,MAXBN,RSOLN,
c IMPLICIT DOUBLE PRECTSION(A-H,O-Z) C C
FUNCTIOX
c -- - - - - - C C
SOLVES THE GTJOBAL STIFFNESS MATRIX USING LU DECOMPOSITION DIMENSION DIMENSION DIMENSION DIMENSION BIMENSlON
r
RRHS (NTOV ) RSOLN (NTOV ) NCOD (YAXDF) RBC (MAXDF) RRSS (MAXDF')
1
2
COMPUTER SIMULATIONS
-
FIN1lE E1,EMENT PROGRAM
C
DO 1021 IMBO = 1,MAXDF RRSS (TMBO) 0.0 1021 CONTINUE
C C*
* * CALCLJLATE HALF BANDWIDTH PARAMETERS
c IHBW=(IBAND-1)/2 IHBW3=IHBWtl C
r*** BOUNDARY
CONDITIONS
DO 8995 ITOV=I,NTOV IF(NCOD(IT0V). N E . 1 ) GO TO 4994
c e h * * INSERT BOUNDARY CONDTTIONS C
STIFF(ITOV,IHBW')=STIFF(ITOV,.LHAW1)*2.D10
c C***
MODIFY RHS VECTOR
C RIiHS~TTOV)=RRHS(ITOV)+STiFF(ITOV,IHBW1)*RRC(ITOV) go to 4995 4994 if(ncod(itov).eq.O) go to 4995 4995 CONTINUE C C*** L'ii DECOMPOSITION C C**;' SET UP THE FIRST ROW. C DO 5 0 0 0 LFIRST=l,IHRW MF.KKST=LFIRST+l NY.LRST=1MBWI-LFIRST STIFF(MFIRST,NFIRST!=STIFF(M~lRST,MFIRST)/STIFF(1,IHBW1) 5000 CONTINUE C
C*** COMPIJWE LU DECOMPOSSTION FOR INTERlOR ELEMENTS C DO 5001 ITOV = 2 ,NTOV JTOV =-1 KTOV = IT'OV+IHBW -1 IF (KTOV.GT .NTOV) KTOV = NTOV LTOV = IZOV-THBW1 DO 5002 MTOV = ITOV,KTOV JTOV = JTOV+1 K1 = ITOV lHBW +JTOV IF(K1 . L T . 1) K1 = 1 LCOLM= MTOV-LTOV 111 - ITOV-1 DO 5002 KROW = K1 ,111 K2 = KROW-lHBW1 MCOLM= KROW-LTOV KCOLMz MTOV-K2 STIFF (ITOV,LCOLM) = 1 S1'IFE (ITOV,LCOLN) -STIFF(ITOV,MCOLM)*STTFF(ICROW,MCOLM) 5002 CONTINUE IF(STO7I.GE.NTOV) GO TO 5001 JTOV = 0 KTOV = KTOV+1
SOURCE CODE OF PPVN.f IF (KTOV.GT .NTOV) KTOV N'fOV 112 = ITOV+L DO 5003 I H O W = I12 ,KTOV JTOV = JTOV+1 ~1 = II'OV IHBW t j ~ o v IF(K1 . L T . 1) K1 - 1 J2 IKOW-IHBWl L = ITOV-J2 IF(JTOV.GE IIIBW) GO TO 8000 DO 5004 K = K1 ,111 K2 = K -1HEW1 M = K -52 N = ITOV-K2 STIFr(IKOW,Lt) =STIFF(IROW,L)-STIFF (IRObJ,Irl) "STIFF ( X , N ) 5004 CONTINUE 8000 CONTINUE STIFF(IROW,L)=STIFF(IROW,L)/STIFF(.CTOV,IHBW1) 5003 CONTiNUE 5001 CONTINUE
c FORWARD REDUCTION LY=F
C***
c 5005
I = 2 ,NTOV = I -1HBW IF(i1 .LT J ) I1 = 1 JZ = I -1HRW1 T T 1 = I -1
DO
11
5006 K = I1 ,Ii1 L = K -I2 RRHS(1)-RRHS(1)-STIFF(L,L)*RRHS(IC) 5006 CONTINUE 5005 CONTINUE DO
c C***
FIND THE SOLUTION VECTOR BY BACK SUBSTITUTION UX=Y
c RSOLN (NTOV) KRHS (NTOV)/STIFF (NTOV,IHBWl) DO 5007 I = 2 ,NTOV I1 = NTOV-I E l I1 - I1 +IHEW IF(I1 .GT.NTOV) I1 - NTOV I 2 - I1 -1HBWl I11 = I1 +1 DO 5008 K = T T Z ,Ii L - K -12 RRHS (11)=RRHS (IT)-STIFF (11, L)*RSOLN(I002 CONTINUE 5001 COWI'INUE 6000 CONTINUE C l E ( N D F . E Q . 1) GO TO 8000 C C * + * MODIFY ARRAY FOR ADDRESSING BOUNDARY DATA
c DO 5999 INP=l,NTOV RBC (INP) 0 NCOD ( INP)= 0
SOURCE CODE OF PPVpI.f 5 999 CONTINTdE
DO 6001 INP=Z,NRC IP(IBC(INP).EQ.O.OR.JBC(INP).EQ.3) GO TO 6003 ICOD-NDP"(lBC(INP) l)tJBC(INP) NCOD (TCOD)= I RBC ( TCOD)=VRC ( ZNP) 6001 CONTINLIE
C U 0 0 0 RETURN
END C ..........................................................................
C SUBROUTTNE GETNO2 (NNP ,CORD , IDVl
, IDV2 ,MAXNP, NDIM)
_--_ -__ IMPLICIT DOUBLE PRECISION(A-h,O-L!
C C
IDVI INPUT DEVICE ID I D V 2 OUTPUT DEVICE ID
C C
c DIMF,NSIO>T CORD(MRXNP, NDIM) C READ (IDV1,lOOO) (IN13 , (COKU(INP,IDF),IDF=1,2! ,JNP=l,NNP) WRITE(IDV2,2000) WRITE (TDVZ,2010) ( J N P , (CORD ( J N P , IDF), IDF=l,2) ,JNP=1,NNP)
c RETURN C
1000 2000 1' 2010
FORMAT(Ii,lE15.8) FORMAT('l',///' ' , 2 0 ( ' * ' ) , ' NODAL COORDINATEd ' , 2 0 ( ' * ' ) , / / ',2(7X,'ID.',7X,'X-COORD',7X,'Y-COORD',20X)/) FORMAT( ' 110,2G35.5,20X, T10,2Gli.5) I ,
END C C C
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SUBROUTINE CETELM (NEL ,NON ,NODE ,IDV1 ,IDV2 ,MAXEL) C IMPLICIT DOUBLE PRECISION(A-H,O-Z)
C
DIMENSION NODE, ( M A x m , 18) C
DO 5 0 0 0 I E L = 1 ,NET, 5000 READ (IDV1,1000)MFX '(NODE IEL,I C N ) ,?CN=;,NCN) bJRlTE(IDV2,2000) no 5010 JEL = 1 ,NEL 50LO Wr;ITE(IDV2,2010) JEL , (NODE J R L ICN), lCN=1,NCN) C RETURN I
ZOC0 FOlWAT(1015) 2000 FOFNAT('l',///,' ',20('*'),' ELEMENT CONNECTIVITY '.20('*'!,// 1' ',7X,'ID.',5X,'N0 D A L -- P 0 L N T E N T R I E S',/! 2010 FORMAT(' ' , I l O , S X , l . O I 8 / , ' ',15X,1018/,'',15X,1018) t END
C
c
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
~ ~ M P SIMULATIONS ~ T E ~
FINITE ELEMENT PROGRAM
C SUBROUTINE GETBCD (NBC,IBC,JBC,VBC,TDVi,IDV2,MAXBC) C IMPLICIT DOUBLE PRECTSION(A-H,O-2) C
DIMENSION IBC (MAXRC) ,JBC (MAXBC),VW (MAXSC) C READ (lDVl,1000) (IBC(LND) ,J B C (IND) , VRC ( IND) ,IND=1,NBC) WRITE(IDV2,2000) WRITE(IDV2,%010) (lBC(IND) ,JBC(IND) ,VBC(IND) ,lND:L,NBC) c
RETURN C 1 000 FORMAT ( 2I5 F10.01 2000 FORMAT(‘ ’ , / / / , ‘ ‘,20(‘*‘),’ BOUNDAKY CONDITIONS ‘,20(’*’),// I
1’ ‘,2(7X,‘ID.’,2X,’DOF’,10X,‘VALUE’,lOX)/) 2010 FORMAT(’ ‘,5X,?T5,G15.5,15X,215,G15.5) C
END c
C
................................................................
n
i .
SUBROUTINE PUTBCV 1 (NNiiE’ ,NBC ,IBC , J R C ,VBC ,NCOD ,MAXEC,MAXDF,BC) C IMPLICIT DOUBLE PRECIS.LON(A-H,O-Z) C C C
NCOD ARRAY FOR IDENTIFICATION OF BOUNDARY NODES BC ARRAY FOR STORING BOTJNDARY CONDITION VALUES
C DIMEPaSION IBC (MAXRC) ,JBC (MAXBC) ,VBC (MAXEC) DIMENSION NCOD (MAXDF) ,BC (MAXDF) C
DO 5000 IND = 1 ,XBC IF(JBC(IND).GT.2) GO TO 5000 rnD lBC(IND)+(JBCIIND)-I)*NNP BC (JND) = VBC (IND) NCOD ( J N D ) = 1 5 0 0 0 CONTTNL‘E
SUBROUTINE PUTBCT 1 (NBC ,IBC ,JBC ,VBC ,NCOD ,BC ,MAXBC,MAXDF) IMPLICIT DOUBLE PRECISSON(A-H,O-Z) DIMENSION IBC (PIAXBC) ,JBC (MAXBC! ,VBC (MAXBC) DIMENSION NCOD (MAXDF) ,BC (MAXDF) DO 5000 IND = I
,NBC TF(JBC(JND) .NE.3) GO TO 5000 JNU = IBC(1ND) BC (JND!= VBC(IND) NCOD (JND)= 1
SOURCE CODE OF PPVN.f 5000 CONTINiiE C
RETUKN END
c C
......................................................................
C
SUBROUTINE CLEAN 1 (R1 , B C ,NCOD ,NTOV ,MAXDF, PWXBN! C
IMPLICIT' DOUBLE PRECISION(A-H,O-Z)
c DIMENSION R1 (MAXDF) DIMENSIDIT BC (MAXD?') DlCMENSlON NCOD ( W D F ) CO>lMON/ONE/ STIFF(2000,300) C C FUNCTION C _ _ _ _~ _ _ _ C CLEANS THE USED ARFLRYS AND PREPARES THEM FOR REUSE C
DO 5 0 0 0 I
= 1,NTOV Rl(1) = 0.0 RC(I) = 0.0 NCOD(I)= 0 5000 CONTINUE DO 5020 I = 1,600 DO 5020 J - 1,500 STIFF ( J ,T! = n. n 5020 CONTINUE
c RETIJRW END C C C
***h*f*fh**X*h**A***hXt**xX*t****"*Xh**************~****-*********~*~~**~~~~**
SUBHOUTINE SETPRM 1 (NNP ,NEK ,NCN ,NODE ,NDF ,XAXEL,MTLXST) C
IMPLICIT DOUaLE PRFCTSION(A-H,O-2) C
DIMENSION NODE (MAXEL,MAXjT) L
C FUNCTION C --_ ----C SETS THE LOCATION DATA FOR NODAL DEGREES OF FREEDOM C DO 5000 IEL - 1 ,NEL DO 5000 ICN - 1 ,NCN KCN =NODE(IEL,I C N ) JCN =ICN+(NDF-1)"NCN LCN =KCN+(NDF-1)"NNP
c NODE (IEL,JCN) = LCN C
5000 CONTINUE C
KETURN END
7
IMPLaICT'I 30URLE P R E O I S I O N ( A - H , 0 - Z )
c DIMENSION PMAT (EIIAXEL,
8)
C WRITE ( LDV2 2 0 0 0 ) I
C READ ( T D V 1 , l O O O ) RVISC ,POWER .TRFF ,TBCO ,RODEN , C P ,CONDK
READ ( I D V l , 1 0 1 0 ) RPLAM lFROM = 1 I T 0 = NEL I F ( T R E F . E Q . 0 . ) TREF = 0.00: DO 5 0 1 0 I E L = IFROM ,IT0 P M A T ( I E L , l ) = RVISC P M A T ( I E L , 2 ) = RPLAl4 PMAT ( I E L , 3 ) = POWER P M A T ( I F L , 4 ) = TREF PMAT(TEL,S) = TBCO PMnT ( I E L , 6) = RODEN PMAT(TEL,7) = CF PMAT ( I E L , 8 ) CONDK RTEM = TREF C
C C C C C C
* + * PARAMETERS OF 'SHE POWEK-LAW MUDEL
*** **k
*** *** ***
RVISC =
MEU NOUGHT, CONSlSTENCY C O E F F I C I E N T
RPLAM - PENALTY PARAMETER POWbR = POWER LAW TNDEX TRFF = REFERENCE TEMPERATURE TRCO = COEFFICIENT b I N THE POWFH LAW MODEL
C
c ***
w Y s I C a L PARAMETERS
C
C C
C
*** *** ***
RODEN = MATERIAI, DENSITY CP = S P E C T F I C HEAT CONDK = HEAT CONDUCTiVITY C O E F F I C I E N T
C
5 0 1 0 CONTINUE
c WTITE ( l D V 2 , 2 0 1 0 ) IFROM ,I T 0 , K'gISC ,KPLAM ,POWER WRITE ( I D V Z , 2 0 2 0 ) b J R I T R ( I D 7 J 7 , 2 0 3 0 ) TREF ,TBCO V\JRITE (IDVZ, 2 0 4 0 ) C 1 ; R I T E ( l D V 2 , 2 0 5 0 ) RODEN , C P ,CONDK 5 0 0 0 CONTINUE
C RETU RX L
1 0 0 0 FORMAT(7FlO.O)
1010 FORMAT'(F15.0)
SOURCE CODE OF FPVN.f 7000 rORMAT('U',//' ',35('*'),'IVIATERlAL PROPERTIES',35('*'),// I' ' ,7X,'ID.' , iX, 'EID.(FROM-TO)' ,7X,'CONSISTENCY COEYFICIEN'I'',8X, 2 ' PENALTY P A W E T E R ',R X , POWER LAW INDEX', / 1 2 010 FORlviAT ( ' ' ,I10,114,14,3G2 0.5 2020 FOXMAT(lOX,#**REFERENCE TEMPERHTURE * * * * COEFFICIENT h " " ' 1 2 0 3 0 FOflMAT(17X.G10.3,17X,Gl0.3) 2040 FORMAT 1(1OX,' * * DFNSITY * * * * SPECIFiC €IFAT * * * * CONDUCTIVITY * * ' ) 2 0 5 0 FORMAT(tdX,GlO.3,8X,Gl0.3,l?X.G1~1.3~ C
END
c (-
* * * * h * * x ~ % * k * * * * * * * % % * ~ * * r ~ * ~ * * * t * * h * * * * ~ % * * * * * * * * k ~ * * * * * * * * * * ~ * ~ * ~ % * * ~ ~ * * % ~
C
SUBROUTINE VISCA 1 (RL7ISC, POWER,VISC,SRFlTE, STmP,RTEM,TCO) C IMPLICIT DOUBLE PRECISION(A-Ii,O-Z) C C * * * CALCULATE SHEAR DEPENDENT VISCOSITY
c PTNDX = (POWER-L )/2
VISC
=
RVISCX((4.*SRATF,)**PINDX)*RXP(-TCO*(STEMP-RTEM))
C RETURN END C
c
i * * % * * * * * ~ * * * * * * * * f * * * * * * * * * * * * X * * * * ~ * ~ * * * * * * * * * * *
c SUBROUTINE COIVI'OL 1 (VEL,TEPIP, IThR,NTOV,~P,MnXNP,P.IAXDE, ERROV,ERROT,VET,TET) i
IMPLICI'IDOUBLE PRECISION(A-I-1,O-Z) c
L
DIMEi\ISIOMVFL (MAXDF) ,TEMP iK&XNP) DIMENSION VET (MAXDF),TET (MAXNP) C C
* * * CALCULATE DIFFERLNCE BETWEEN VELOCITIES IN CONSECUTIVE 1TERATIONS
C ERRV = 0.0
TORV = 0.0 ERRT = 0.0 TORT = 0.0 DO 1000 ICHECR = 1,NTOV IF ( I T E R . EQ .I) VET (ICFIECK) = 0.0 ERRV = ERRV + (VELIICHECR) VET(ICHECK)) + n 2 TORV = TORV + (VLL(ICHEC1C)) * * 2 C VEI'
(ICHECK) = VEL (TCWFCK)
C 1000
CONTTPJUE ERROV= ERRV/TORV
c
C * * * CALCULATE DIFFERENCE BETWEEN TEMPERATURES IN CONSECUTIVE C ITEKA'I'I ONS DO 2 0 0 0 TCHRCK = 1,NNP IF(ITER.EQ.1) TET(1CHECK) = 0.0 ERRT = ERRT t (TEMP(1CHECK) -TETIICHECK)) **2 TOR'I' = TORT + (TEMPJICHECIC))**2
COMPUTER SIMULATIONS - FINITE ELEMENT PROGRAM C
TET (ICHECK) = TEMP (ICHECK) C
2000
COI\I'I?INUE
ERROT- ERRT/TORT
C RETURN
END f
c ...................................................................... C SUBROUTINE OUTPUT 1 (NNP ,VET, ,TEMP ,MAXDF,MAXNP) C
IMPLnICIT DOUBLE PRECISLON(A-h,O - Z ) C
DIMENSION VEL (MAXDF),TEMP (MAXNP) C
WRTTE(G0.6000) 5999 FOPM?LT(' ID. UX
UY
T' / 1
C
E o w r ( - * * *NODAL
VELOCITIES AND NODAL TEMPERATURES * * * I / ) DO GO01 INP = 1,mP JXTP = I N P + NNP WRITE(G0,6002) 1 INP ,VEL(TNP),VEL(SNP) ,TEMP(IYP) 6002 FORMAT(J5,2E13.4,F13.4)
6000
6001 CONTINUE
c FETURN
END C
c
* * * * l * * * * * X * * * h * f * * * * * * * * * * * * * ~ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * % * * *
C
Gerald, C . F. and Wheatley, P. O., 1984. Applied Numerical Anulvsis, 3rd edn, AddisonEapidus, I,. and Pinder, G. F., 1982. Numerical Solution o j Partial Diyfirential Equations in Science and Engineering, Wiley, New York.
In a Cavtesiaii (planar) coordinate system of (x, y, z ) shown in Appendix Figure I the position vectors for points PI and P2 arc 8'wen as
are unit vectors in the x, y and z directions, respect~vely~ ~ ~ a g ~ i o~f line u d PIP2 e (i.e. the distance between points PIand P2)is thus found 8s
52
A P ~ ~ N ~ SUMMARY I X OF VECTOR AND TENSOR AKRLYSIIS
The ~ ~ ~ r e ccosines ~ i o n of the vector r = x i
-C J$
+z
are the n u ~ b e r sd c ~ ~ as ~ed
z cos y -- -
lel
where n, /j and y are the angles which the vector makes with the positive ~ i r e c t i o ~of§ the coordinate axis shown in App x Figure I and 1 vector ~ a ~ ~ i t found u d e as Irl i- y2 -i- 9” er. ~ o ~ iused ~ orthoo ~ l ~ onal ~ ~ o r systems d ~ are ~ acylindrid ~ ~ (polar) a pherical systems s k o ~ nas ~
7;:
d,.w2
or
x
Spherical (r, 0, 4)
a l t r a n s f o ~ ~ ~of i oanCartesian vector A wit system o f 0123, under rolation of thc coordiaate system to 01 2 3 is by the ~ o ~ ~ ~e qwuia~t ~i ~gn
3 -
AJ = &/Ar
(su~mationconvci~t~on over the repeated index I i s ~ ~ ~ l i e d )
where ,& denote the c ~ ~ ~ o n eof~the i t vector s in coordinate system 01 2 3 and dJI are the cosines of the angles between the old axis oi (i 1,231 and the new one c’j. Therefore I--
vector which remains unchan~edin such a transfo~iation(i.e. to be i n v ~ r i a ~ t .
-
) is said
are equal if they have the same ~ a ~ n iaiid t ~ ~ c position of their origin. ctor whose ~ a ~ n i ~ is u dequal e to the magnitude site direction is denoted by - A . The sum (resultant) of vectors ~ a ~ ~ ~ l llaw e ~~ ro a~p r~ ai c~shown ~ ~ l yas
PH
is a vector having the same
(commutative law for addition) (associative law for addition) (coi~mutativelaw for ~ ~ u l t i p ~ ~ c ~ ~ i ~ (associative law for n i ~ i l t i ~ l ~ ~ a t i o i i ~ (distribu~~ve law)
54
APPENDIX
-
SUMMARY OF VECTOR AND TENSOR ANALYSIS
The scalar (dot) product of two vectors is a iiutnber found as
1 cos0 where 0 < 8 < ?r is the angle between the directions of ~~tei-~iatively in terms of components of
= 1 then A and (commutative law for scalar product)
+ A.C
(distributive law for scalar product)
Vector (cross) produc with a ~ a ~ n i t u of de the directions o f A and B such that A , B and C make a right-handed system shown as
l t ~ r ~ a t i v ein~terns y of the components of can be expressed as the followitig determinant
, the vector p r ~ ~ uAc tx
~speci~cally i x i =j x j =
(distributive law)
SOME VECTOR CALCULUS RELATIONS
c
S
be a vector whose c o ~ p o n e ~are t s functions of a scalar variable (e.g. timedependent positioii vector of a point P in a three-dimensional domain) ( t )= x(t)i ty ( t ) j
+ L(t)k
then
If are ~ i f f ~ r e n t i ~ vector b ~ e functions of scalar t and # is a differentiable function of I then
xB
and
d -(A x
3t
The vector differential operator del (or mblu) written as 0 is defined by
are the unit vectors in a Cartesian coordinate system. The del operator has properties analogous to those of ordinary vectors. The ~~~~~e~~ of a scalar 4 (x, y , z> i s defined by
The urivergence of a vector V(x, y , z) i s defined by
A P ~ ~ N ~ SUMMAKY I X OF VECTOR AND ‘TENSOR ANALYSIS
The ctid of a vector
(x, y ,
z) is defined by
x A ) = V(V.A)- V2A
where
(in a Cartesiaxi system) is called the Lapucim operator. (1) =
P’Jt)i+ VJ(t)j-+ Vz(t)
If there exists a vector
then
is an arbitrary constant vector.
If V is the volume bounded by a closed surface S and ~ ~ ~with t icoi~ti~ o ~ uous derivatives, then
is a vector fbnction of
SOME VECTOR CALCULUS RELATIONS
dS =
.dS
S
If
Note that the surface integral surface S.
$&
denotes the flux of
Over the closed
oke Let S he an open, two-sided surface bour~de~l by a curve C, then the line inte of vector A (curve C i s traversed in the positive direction) is expressed as
C
S
s
Note that Green's theorem in the plane expressed as
is the special case of the toltes theorem. It should also be noted that 5. div~~gence theorem can.be obt ned by ~ c i ~ ~ ~ a l ~of~~d~t ie oe nntheor 's plane by replacing the region aiid i t s boundary curve C with a space region
corern provides 3 coiivcnieiit means for obtaining rate of change of vector field f u ~ c t over i ~ ~a volume V(t) as
where
is the i ~ a t e r ~ as u~ b s t a ~ ttime i~ld ~ e r i v ~ t i vand ~
1'
i s the velocity vector.
(i
A ~ P E -~S ~U ~ MX A ~OF Y VECTOR AND TENSOR ANALYSIS
8. These definitions arise from the transformation properties of vectors and can be s ~ ~ i i ~ i i i a r ias ~ efollows: d If in the tramforination of the coordinate system (XI, x2,. . . ,x") to another system (d,.Z*, , . . ,P)quantities AI, A2,. . .A, transform to AI, A*,. . . ,AlI, such that A,,p = 1 , 2 , . . . ,n
then A I A2,. . . ,A , arc the components of a covariant vector. A',A2,. . . ,A" are said to be components of a contravariant vector if in the tra~sformatio~i of the coordinate system ( x i ,x2,. . . ,xN) to anothcr system (Z',Z2,., . they transform according to
,a)
A Y , p I= 1,2,.. . , n
Field variables i ~ e n t i ~ ebyd their m a ~ i t u d eand two associated called s ~ c o n ~ - o r dtensors er (by analogy a scalar is said to be a zero-order tensor and a vector is a first-order tensor). An important example of a second-order t~~so is rthe physical function stress which i s a surface force i d e n t ~ ~ eby d n i a ~ ~ t directioii ~ ~ e , and orientation of the surface upon which it is acting. Using a inathematical approach a second-order Cartesiaii tensor is defined as an nine components To, i, j = 1, 2, 3, in--_ the Cartesian coordinate system of 0123 which on rotation of the system to 01 2 3 become
where n'ip arid djq are the cosines of the mglcs betwecn the new and old conditions of these direction cosines the c o ~ r ~axis. ~ i ~y the ~ ~orthogo~ality e inverse of this transforniatioii is expressed as
in a t h r e c ~ d i ~ e n s ~ o nf raal I ~ ~of e onents of a second-order tensor reference are written as the following 3 x 3 matrix
TENSOR ALGEBRA
It follows that by using coinponent forms second-order tensors can also be i~anipulatedby rules of matrix analysis. A second-order tensor whose components satisfy TEI= T,, is called symmetric a i d has six distinct components. If T , = -Tiz then the tensor is said to aiitisymmet ric. To obtain the transpose of a tensor the indices of its components (originally given as TPq)are transposed such that
P
Y
where ap is the unit vector in direction p . Tensors of second rank are shown either using expanded or Dyadic notations. Dyadic forms are genesali~ationo f vectors and are sbown as two vectors together without brackets or rnultiplicatiorii symbols. For exam denotes the dyadic product of vectors A and which is a second-order tensor (a further generalizatio ading to ‘triads’ ms of its c o ~ p ~ n e n t s is shown in the denote third-order tensors). expanded form as
P
Y
(i.e. ii, j j , ij, ji,etc.) are red pairs of c o o r ~ ~ ~ i a t e directions. An isotropic tensor is one whose components are unchan~edby rot~~tion of the c o o r ~ i ~ asystem. te
The unit seco~id~order tensor is the given as the fol~ow~ng matrix
he sum of two tensors is found by adding their corsespon~ixigcomponents as
P
Y
2
A P P E -~SUMMARY ~ ~ OF VECTOR AND TENSOR ANALYSIS
The scalar (double-dot) product of two tensors is found as follows
T
using ~ y a ~~roducts ic
The tensor ( s i i ~ ~ l ~ - dproduct ot) of two tensors i s foun
-
i,e. yl of the
nt is Y
ot> p ~ o ~ of u a~ teiisor t with a vector i s foun
TENSOR ALGEBRA
The tensor (cross) product of a tensor with a vector i s found as follows
__ -
i.e. pi component __ Y
ere egkis the permutation symbol which is a third-order tensor de
0, if any two of i, j,k are the same 1 if ijk is an even per~utationof 1,2,3 - 1 if jjk is an odd permutation of 1,2,3
The n ~ ~ g n i t u dofe a tensor i s defiiicd as
Any tensor may be re a ~ ~ ~ s y ~ m part etric
as the sum of a sy~iiietricpart and an
The o p ~ r ~ ~ tofi o~i d~e n t i ~ y two i n ~ indices of a tensor arid so su thein is ~ ~ n o wasn c o n t ~ a c t i o T, ~ , = TIT $- T22 $- T33.
The fol~owingthree scalars r c ~ a i ni n ~ e ~ e ~ ~ of d ethe n t choice of c o o r ~ ~ n a t e are defined and hence are called t
The first invariant is the trace of the tensor, found as T,,
ZE
+
T22
+
T33
(sum of diagonal terms in the c o m ~ o ~ e n t s
~ - SUMMARY ~ OF ~ VECTOR N AND TENSOR ~ ANALYSIS ~
A
The second invariant is the trace of
LI = trace of T~ = tr
TzjT/i 1
1
It can heiicc: be seen that the magnitude of a sy~metrictensor its second invariant as
he third invariant is the trace of
Jia~o~ous to vector operations the tensorial form of the divergence theorem is
written as
A n a l o ~ o to ~ svector operations the tensorial form of tokes t l ~ e o r is e ~written as s Y
c
itrrilar to vectors, based on tlie tra~isfo~i~atioii p r ~ p e ~ t i of e s the second tensors the following three types of covariant, contravariant and mixed coiiiponents are defined
SOME TENSOR CALCULUS RELATIONS
JPr
3.P 3%' = .~
3xq dx'
coiitravariant
(summation convention is used)
Note that convected derivatives of the stress (and rate of strain) tensors appearing in the rheological relationships derived for n o n - ~ e w t o n i afluids ~ will have different forms depending on whether covariant or contravariant components of these tensors are uscd. For cxainple, the convected time derivatives o f covariant and contravariant stress tensors are expressed as
(covariaiit tensor and
.T
(contravariant tensor
+ ( V V ) ~are ] the vorticity vector aiicl rate of ld, respectively. Note that the c the special case of the general time derivative the coinponelit forms the above time derivatives are written as o,
dVk
fit{+ T,n Chj
~ ~ o v a r icom~oneiits a~~t corresponding to lowerconvected d e r i ~ ~ ~ t i v c ~
and
In a Gartesian coordinate system the differential o f arc length of a line is defined as ds = ddx2 idy2 dz2 (and hence d? = dx2 + dy2 + dz2). After t r a n s f o ~ ~ a tion from the Cartesian system (x,y , z) to a general t h r e e - d ~ ~ e n s i ocurvi~~a~ linear coordina~esystcrn (E) this can be written as
+
2
A
~
~ - ~S U~~ ~ NA ROF ~ Y VECI'OR ~ X AND ~ ~ N ANALYSIS S O ~
or using s L ~ m ~ ~ t convention ioii
where the quaiitities gpyare elemenis of a matrix found as the dot ~ r o ~ L i cof ts the pairs of basic tangential vectors as p,q,k = I , ...,n The f o l ~ o w i nfigure ~ i s a two~di~iiensional example il~ustratin~ the synibols use in the ~ r ~ v r ~ l ao t i~o isi s h ~ ~ .
Y
E' x
The matrix gpcl represents the components o f a covariant ~ ~ c o i i d - oteiisor r~~~r called the 'metric tensor", ~ e c a u it s ~defines ~ ~ s t a ~~ ic ~c a s u ~with e i ~ rese ~ ~ inatcs E', , . . ,