Beruflich Dokumente
Kultur Dokumente
M
L
SO
MULTIPHYSIC
S
Equation
Based(PDE)
V4
COMSOL MULTIPHYSICS
- Mathematics Interface -
Equation-Based Modeling:
PDEs, ODEs, and Algebraic Equations
2u
u
ea 2 d a
(cu u ) u au f
t
t
Custom-Modeling in COMSOL
COMSOL Multiphysics allows you to model with PDEs
or ODEs directly:
use one of the equation-template user interfaces
Customization Approaches
Four modeling approaches:
1. Ready-made physics interfaces
2. First principles with the equation templates
3. Start with ready-made physics interface and add additional ter
ms.
4. Start with a ready-made physics interface and add your own se
parate equation (PDE,ODE) to represent physics that is not alr
eady available as a ready-made application mode
Equation view
PDEs
Laplaces equation
Heat equation
ut (ku ) 0
Wave equation
utt (u ) 0
Helmholtz equation
(u ) u
ut bu x 0
Coefficient form
Coefficients correspond to common physical parameters (e.g., diffusion, advect
ion, etc.)
General form
Very flexible and compact
Weak form
PDE form that is the foundation of the FEM
Integral form that gives even more flexibility
Requires more expert knowledge
Q: Which to use?
A: Whichever is more convenient for you and your simulation.
Coefficient Form
2u
u
ea 2 d a
(cu u ) u au f
t
t
n (c u u ) qu g hT
hu r
on boundary
u 1
u0
inside domain
on boundary
inside
domain
Demo:
Block: 10x1x1
PDE: default Poissons
equation with unknown u.
Dirichlet boundary
condition everywhere: u=0
source
absorption
2u
u
ea 2 d a
(cu u ) u au f
t
t
mass
damping/
mass
convection
convection
source
initial/thermal
stress
2u
u
ea 2 d a
(cu u ) u au f
t
t
mass
damped
mass
body force
(gravitation)
ea
density
da
damping coefficient
cu
diffusion
source
absorption
2u
u
ea 2 d a
(cu u ) u au f
t
t
accumulation/storage
convection
convection
source
Helmholtz term
u
2u
ea 2 d a
(cu u ) u au f
t
t
Helmholtz equation:
(cu ) k 2u f
a k 2
k
Wave number
Wave length
source
Demo:
lambda=2.5
k=2*pi/lambda
a= - k^2
f=0
u=1 one end
u=0 other end
u
u
inside domain
ea 2 d a
F
t
t
T
on domain boundary
n G
u
0R
ux uy F 1
R u.
Weak Form
u
F
t
General form
da
dav
u
dA v dA vFdA
t
u
dA v n ds v dA vFdA
0 v vF d a v dA v n ds
t
dav
Rearranged
PDEs+ODEs
2u
u
ea 2 d a
(cu u ) u au f
t
t
source
accumulation/storage
d a C
ck
f volume heat source
Demo:
c=1
da=1
f=0
Transient 0->100 s
w U dt
t
U udV
V
U dt
t [ t 0 ,t1 ]
wt U 0
VudV
dw
U
dt
http://www.comsol.com/video/video-307 /
P( x, y, z ) u ( x, y, z )dt
P( x, y, z ) u ( x, y, z )dt
dP
u at each point in space
dt
dP
u local time integral of solution
dt
But this can be seen as a PDE with no spatial derivatives =
= Distributed ODE
Use coefficient form with unknown field P, c = 0, f = u, da=1
Let all other coefficients be zero
P( x, y, z ) u ( x, y, z )dt
Phase Change
Phase change: c=1+2.75*(P(x,y,z)>20)
P>20 evaluates to either 0 (false) or 1 (true)
c takes two values: 1 or 3.75 depending on if damage is
done at a point or not
Phase Change
Phase change: c=1+2.75*(P(x,y,z)>20)
Also:
P ( x, y, z ) (u ( x, y, z ) 1)dt
t
Irreversible change!
Negative u:s arent allowed to decrease P
Once P>20, the change in diffusion coefficient c from 1 to
3.75 is permanent
Phase Change
More advanced phase change: c=1+2.75*(P(x,y,z)>20)
Also:
P ( x, y, z ) (u ( x, y, z ) 1)dt
t
For convergence:
inequalities may need smoothing:
P>20 ==> step1(P at 20,ds=5)
u>1
==> step2(u at 1,ds=0.5)
also: fine enough mesh to resolve phase fronts
Phase Change
P ( x, y, z ) (u ( x, y, z ) 1)dt
t
For convergence:
inequalities may need smoothing:
P>20 ==> step1(P at 20,ds=5)
u>1
==> step2(u at 1,ds=0.5)
also: fine enough mesh to resolve phase fronts
(kT ) C u T 0
pM
RT
Easy - analytical
(kT ) C u T 0
2
given by non-ideal gas law: A * ( p B )(1 C ) D 0
Needed for high molecular weight at very high pressure
s
Difficult implicit equation
How to proceed?
How to solve:
A * ( p B 2 )(1 C ) D 0
Third order equation in
Pressure p is function of space
So: this is an algebraic equation at each point in space!
How to solve:
A * ( p B 2 )(1 C ) D
Third order equation in
Pressure p is function of space
So: this is an algebraic equation at each point in space
See as PDE with no space or time derivatives!
A*(p+B*rho^2)*(1-C*rho)-D*rho
or if unknown is u:
A*(p+B*u^2)*(1-C*u)-D*u
How: Put the entire equation in the source (f) term and zero out the rest
Systems of PDEs
How to enter a system of PDEs?
Coefficient matching!
v ( D ) (V ) 0
t
( r 0V )
source
absorption
2u
u
ea 2 d a
(cu u ) u au f
t
t
mass
damped
mass
convection
convection
source
u [ ,V ]
da
u
(cu ) u au f
t
u
da
(cu ) u au f
t
D
1 0 t
(
0
0 0 V
v x , v y 0 0 0 0
)
0 r V 0
0 V 1 0 V 0
v ( D ) (V ) 0
t
( r 0V )
hu r
D
n (
0
q11 q12 g1
)
0 r V q21 q22 V g 2
h11
h
21
h12 r1
h22 V r2
1 0
0 1
Example problem:
0
0
0
0.5
0
1
0.01
1
Implementation in COMSOL
For the moment we are interested in the kernel of the domain integral, i.e. the
domain weak term.
,
,
COMSOL notation:
,2
2
2
_ 2
PDE
Coefficient Form
General Form
Weak Form
ODE / DAE
Ready-made
Application (Module)
COMSOL MULTIPHYSICS
- Coefficient Form PDE -
PDEs in shells;
current conduction in a steel tank
Introduction
Domain Equation
( d V ) 0
Results
Potential distribution
Results
Results
Shell Diffusion
Introduction
A goal for many applications is to predict physics in thin structures, such as shells,
without modeling the thickness of the structure. This is because large aspect ratios can
cause meshing and geometry analysis problems. The model reported here
demonstrates how to use the tangential derivative variables in COMSOL
Multiphysics to solve partial differential equations in curved 3D shells and 2D
boundaries without modeling their thickness.
Model Definition
The steel tank shown below has two pipe connections. One is grounded and the other
connects to a dead current source. This model calculates the current density in the tank
shell along with the potential distribution across the surface.
0V
400 V
EQUATIONS
(1)
Here, is the electrical conductivity (S/m) and V is the electric potential (V).
The material is a 1 mm thick steel sheet with a conductivity of 4.032106 S/m. You
are working with a surface in 3D so there is no thickness in the model. To account for
the charge conservation in Equation 1 you must multiply the current flux expression
with the shell thickness d:
( dV ) = 0
(2)
1 |
SHELL DIFFUSION
Results
Figure 1 shows the potential distribution across the surface.
2 |
SHELL DIFFUSION
3 |
SHELL DIFFUSION
The plot of the magnitude of the local current density in Figure 3 is interesting because
you can use it to calculate the resistive heating in the material as an extension to the
model.
Modeling Instructions
From the File menu, choose New.
NEW
4 |
SHELL DIFFUSION
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Parameters settings window, locate the Parameters section.
3 In the table, enter the following settings:
Name
Expression
Value
Description
sigma
4.032e6[S/m]
4.032E6 S/m
Conductivity
1[mm]
0.001000 m
Shell thickness
GEOMETRY 1
Create the geometry. To simplify this step, insert a prepared geometry sequence.
1 On the Geometry toolbar, click Import/Export and choose Insert Sequence.
2 Browse to the models Model Library folder and double-click the file
shell_diffusion.mph.
3 Then click Build all on the Geometry toolbar.
COEFFICIENT FORM BOUNDARY PDE
1 In the Model Builder window, under Component 1 click Coefficient Form Boundary
PDE.
2 In the Coefficient Form Boundary PDE settings window, locate the Units section.
3 Find the Dependent variable quantity subsection. From the list, choose Electric potential (V).
4 In the Unit edit field, type A*m^-2.
These settings specify the charge conservation equation Equation 2 for the shell
surface.
5 |
SHELL DIFFUSION
1 On the Physics toolbar, click Edges and choose Dirichlet Boundary Condition.
2 Select Edges 14, 15, 25, and 29 only.
3 In the Dirichlet Boundary Condition settings window, locate the Dirichlet Boundary
Condition section.
4 In the r edit field, type 400.
STUDY 1
6 |
SHELL DIFFUSION
RESULTS
3D Plot Group 1
The default plot shows the potential distribution.
1 Click the Zoom Extents button on the Graphics toolbar.
Rotate the geometry so that you see both pipe connections. Then compare the result
with the plot in Figure 1.
Add an arrow surface plot of the current field as follows:
2 In the Model Builder window, right-click 3D Plot Group 1 and choose Arrow Surface.
3 In the Arrow Surface settings window, locate the Expression section.
4 In the x component edit field, type -sigma*VTx.
5 In the y component edit field, type -sigma*VTy.
6 In the z component edit field, type -sigma*VTz.
7 Select the Description check box.
8 In the associated edit field, type Current field (-sigma*VTx, -sigma*VTy,
-sigma*VTz).
9 Locate the Coloring and Style section. From the Arrow length list, choose Normalized.
10 On the 3D plot group toolbar, click Plot.
The plot in the Graphics window should now look like that in Figure 2.
3D Plot Group 2
To visualize the magnitude of the local current density, follow the steps given below.
1 On the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the 3D Plot Group settings window, click to expand the Title section.
3 From the Title type list, choose Manual.
4 In the Title text area, type Current density (A/m<sup>2</sup>).
5 Right-click Results>3D Plot Group 2 and choose Surface.
6 In the Surface settings window, locate the Expression section.
7 In the Expression edit field, type sigma*sqrt(VTx^2+VTy^2+VTz^2).
8 On the 3D plot group toolbar, click Plot.
9 Click the Zoom Extents button on the Graphics toolbar.
7 |
SHELL DIFFUSION
** CAD **
G E O ME T R Y 1
Work Plane 1
1 In the Model Builder window, under Model 1 right-click Geometry 1 and choose Work Plane.
2 In the Work Plane settings window, locate the Plane Definition section.
3 From the Plane list, choose yz-plane.
Bzier Polygon 1
1 In the Model Builder window, under Model 1>Geometry 1>Work Plane1 right-click Plane
Geometry and choose Bzier Polygon.
2 In the Bzier Polygon settings window, locate the Polygon Segments section.
3 Find the Added segments subsection. Click the Add Linear button.
4 Find the Control points subsection. In row 2, set xw to 0.15.
5 Find the Added segments subsection. Click the Add Linear button.
6 Find the Control points subsection. In row 2, set yw to 1.
7 Find the Added segments subsection. Click the Add Linear button.
8 Find the Control points subsection. In row 2, set xw to 0.05.
9 Locate the General section. From the Type list, choose Open curve.
10 Click the Build Selected button.
Fillet 1
1 Right-click Plane Geometry and choose Fillet.
2 On the object b1, select Points 3 and 4 only.
3 In the Fillet settings window, locate the Radius edit field, type 0.05
Revolvee 1
1 In the Model Bu
uilder window, under Model 1>G
Geometry 1 right-click Work Plane 1 and
choose Revolve.
2 Right--click Revolv
ve 1 and cho
oose Build S
Selected.
Work P
Plane 2
1 Right--click Geome
etry 1 and choose
c
Work
k Plane.
2 In the
e Work Plane settings window,
w
locatte the Plane
e Definition section.
3 From the Plane lisst, choose yz-plane.
4 Click tthe Show Work
W
Plane button.
b
Circle 1
1 In the
e Model Bu
uilder windo
ow, under M
Model 1>Ge
eometry 1>Work Planee 2 right-clicck Plane
Geomettry and choo
ose Circle.
2 In the
e Circle settin
ngs window,, locate the Size and Sh
hape section.
3 In the
e Radius editt field, type 0.05.
4 Locate
e the Positio
on section. In the yw ed
dit field, type
e 0.2.
5 Click tthe Build Se
elected butto
on.
Extrudee 1
1 In the Model Bu
uilder window, under Model 1>G
Geometry 1 right-click Work Plane 2 and
choose Extrude.
2 In the
e Extrude settings windo
ow, locate th
he Distancess from Plane
e section.
3 In the
e table, enterr the following settings:
Convert to Surface 1
1 In the Model Builder window, right-click Geometry 1 and choose Conversions>Convert to
Surface.
2 Click the Select All Objects button on the Graphics toolbar.
3 Click the Build Selected button.
Delete Entities 1
1 Right-click Geometry 1 and choose Delete Entities. Next, select all boundaries of the extruded
cylinder. This is most easily done as follows.
2 Click the Go to ZX View button on the Graphics toolbar.
3 Click the Wireframe Rendering button on the Graphics toolbar.
4 Click the Select box button on the Graphics toolbar, then click and drag in the Graphics window
to enclose the small cylinder, and finally right-click to confirm the selection.
5 Click the Build Selected button.
6 Click the Go to Default 3D View button on the Graphics toolbar.
7 Click the Wireframe Rendering button on the Graphics toolbar to return to the default
rendering state.
8 Click the Zoom Extents button on the Graphics toolbar.
The model geometry is now complete.
COMSOL MULTIPHYSICS
- General Form PDE -
dimensionless
Rp=5mm
Rp=2.5mm
Model Definition
The following example simulates the initial transient heating process of a pelletized
piece of magnetite ore. This is the first step in the process of making hematite ore
pellets, an important raw material for the steel industry.
During the initial heating of a magnetite pellet the temperature is in a range that allows
you to disregard any phase change of moisture. Thus it is possible to use a transient
heat-conduction equation with constant properties in spherical symmetry. You can also
scale the equation for easy parameterization of the radius.
COMSOL
1 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
Figure 1 depicts some pellets together with a push pin as a scale reference.
t
r
r r
r sin
r 2 sin
where is the density (kg/m3), cp gives the heat capacity (J/(kgK)), k denotes the
thermal conductivity (W/(mK)), and Q is an internal heat source (W/m3). Further,
r, , and are the spatial coordinates.
Assuming a perfect sphere of radius Rp and no change in temperature with differing
space angles, or T = T = 0 , gives
T 1
2 T
c p ------- + ----2- ----- k r ------- = Q
t r r
r
2 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
COMSOL
(1)
Using a dimensionless radial coordinate r by scaling the equation provides the option
to quickly change the pellets radius without changing or parameterizing the geometry
size1. Introducing the dimensionless coordinate
1
r
r = -------, ----- = ------- ----R p r
R p r
and substituting in Equation 1 leads to
2
2
2
T k r - T
------- = r Q
r c p ------- + ----- ----------t r R 2 r
p
(2)
r = 0
r
NAME
VALUE
Density
2000 kg/m3
cp
Heat capacity
300 J/(kgK)
Conductivity
0.5 W/(mK)
Rp
Pellet radius
0.005 m
Heat source
0 W/m3
1. Note that scaling the variables to get well-conditioned problems is not necessary in COMSOL
Multiphysics because the solvers use automatic variable scaling.
COMSOL
3 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
Because of symmetry about r = 0, there is zero flux through this point, meaning
T-----= 0.
r
At the surface, r = 1 , you use a convective heating expression with a heat transfer
coefficient, hs (W/(m2K), for the influx of heat (W/m2):
q in = h s ( T ext T )
(3)
This expression describes a hot gas with a temperature Text flowing around the pellet.
Text is chosen at 95 C. The heat transfer coefficient is set to 1000 W/(m2K). The
initial condition is set to 25 C.
Results
t=10s
t=0s
4 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
COMSOL
center of the pellet has not reached steady state at 10 s. You can also plot the time
evolution of the temperature at the center of the pellet.
Figure 3: Time evolution of temperature in the center of a pellet with radius Rp = 5 mm.
COMSOL
5 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
Figure 3 shows even more clearly how long the process must yet go before it reaches
steady state. An interesting next step is to experiment with different particle radii, Rp,
and different heating times.
Figure 4: Time evolution in the center of a pellet with radius Rp = 2.5 mm.
Simply reducing the radius somewhat lets the model reach steady state within 7 s.
u
u
ea
+ da + = F
2
t
R
n = G + u
0=R
6 |
in
on
on
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
COMSOL
The space coordinate in the model is r . For typographical reasons we use rh in this
model for r-hat. Identifying the general form with Equation 2, the following
settings generate the correct equation:
COEFFICIENT
EXPRESSION
ea
da
2
r c p
(flux vector)
2
k r - -----T----------2
R p r
F (source term)
You must take special care when setting the heat-influx boundary condition on the
pellet surface. hs( Text T) = k T/r on the surface, so you need to compensate G
accordingly:
2
r
G = ------- h s ( T ext T )
Rp
Modeling Instructions
MODEL WIZARD
following settings:
T
COMSOL
7 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
The equations in this model are given using the dimensionless radial coordinate.
Turning off unit support avoids warnings about inconsistent use of units.
GLOBAL DEFINITIONS
Parameters
1 In the Model Builder window, right-click Global Definitions and choose Parameters.
2 In the Parameters settings window, locate the Parameters section.
3 In the table, enter the following settings:
Name
Expression
Description
rho
2000
Density (kg/m^3)
cp
300
0.5
Rp
0.005
Qs
hs
1000
Text
368
Tinit
298
GEOMETRY 1
Interval 1
1 In the Model Builder window, under Model 1 right-click Geometry 1 and choose
Interval.
2 In the Settings window, click Build All.
8 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
COMSOL
Note that Tx is the COMSOL Multiphysics syntax for the partial derivative of the
variable T with respect to the coordinate x.
Initial Values 1
1 In the Model Builder window, under Model 1>General Form PDE click Initial Values 1.
2 In the Initial Values settings window, locate the Initial Values section.
3 In the T edit field, type Tinit.
Flux/Source 1
1 In the Model Builder window, right-click General Form PDE and choose Flux/Source.
2 Select Boundary 1 only.
Flux/Source 2
1 Right-click General Form PDE and choose Flux/Source.
2 Select Boundary 2 only.
3 In the Flux/Source settings window, locate the Boundary Flux/Source section.
4 In the g edit field, type x^2/Rp*hs*(Text-T).
MESH 1
Scale 1
1 In the Model Builder window, under Model 1 right-click Mesh 1 and choose Scale.
2 In the Scale settings window, locate the Scale section.
3 In the Element size scale edit field, type 0.4.
Edge 1
1 In the Model Builder window, right-click Mesh 1 and choose Edge.
2 In the Settings window, click Build All.
COMSOL
9 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
STUDY 1
The default plot shows the temperature versus the dimensionless radius for all times in
the specified interval.
1D Plot Group 1
1 In the Model Builder window, under Results click 1D Plot Group 1.
2 In the 1D Plot Group settings window, locate the Title section.
3 From the Title type list, choose Manual.
4 In the Title text area, type Temperature.
5 Locate the Plot Settings section. Select the x-axis label check box.
6 In the associated edit field, type Dimensionless radius.
7 Select the y-axis label check box.
8 In the associated edit field, type T (K).
9 Click the Plot button.
To plot the time evolution of temperature at the center of the pellet of radius 5 mm
(Figure 3), follow the steps given below.
1D Plot Group 2
1 In the Model Builder window, right-click Results and choose 1D Plot Group.
2 Right-click 1D Plot Group 2 and choose Point Graph.
3 Select Boundary 1 only.
4 In the Point Graph settings window, click to expand the Legends section.
5 Clear the Show legends check box.
6 In the Model Builder window, click 1D Plot Group 2.
7 In the 1D Plot Group settings window, locate the Plot Settings section.
8 Select the x-axis label check box.
10 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
COMSOL
Now change the pellet radius to 2.5 mm in the Parameters feature and see its effect on
the time evolution of temperature at the center of the pellet.
GLOBAL DEFINITIONS
Parameters
1 In the Model Builder window, under Global Definitions click Parameters.
2 In the Parameters settings window, locate the Parameters section.
3 In the table, enter the following settings:
Name
Expression
Description
Rp
0.0025
STUDY 1
1D Plot Group 2
The resulting plot should look like Figure 4.
1 In the Model Builder window, under Results right-click 1D Plot Group 2 and choose
Plot.
COMSOL
11 |
S P H E R I C A L L Y S Y M M E T R I C TR A N S P O R T
COMSOL MULTIPHYSICS
- Weak Form PDE -
Introduction
Geometry
Coupling Scheme
D c c u n cu n
k ads
(c cads )
k des
c
D c c u 0
t
D c c u n
k ads c 0 cads k des cads
D c c u n 0
c c0
cs
s Ds scs
t
k ads c 0 cs k des cs
Weak Form
da
General Form:
cs
F
t
0 0
c
T s
0 D
where:
da 1
General form
da
da v
u
dA v dA vFdA
t
dav
u
dA v n ds v dA vFdA
t
0 v vF d a v dA v n ds
t
Rearranged
In COMSOL Multiphysics:
Ds*(-test(csTx)*csTx-test(csTy)*csTy)+test(cs)*(R-cst)
Increase in lateral
supply of reactant
(radial diffusion)
Concluding Remarks
Model Definition
The first approximation you can make is to reduce the 3D geometry to 2D, which is
reasonable if the variations in concentration are small along the depth of the domain.
Figure 1 shows how the 2D model domain is related to the full 3D reactor geometry.
COMSOL
1 |
TR A N S P O R T A N D A D S O R P T I O N
3D
2D
Gas outlet
Active surface
Active surface
As
A
Gas inlet
Figure 1: The modeled domain is a parallel plate reactor with an active surface where you
want to model the concentration of surface species. A denotes molecular species dissolved in
gas and As the same species adsorbed on the surface.
MODEL EQUATIONS
kf
kr
AS
where kf and kr are forward and reverse rate constants. A and As are the molecular
species in the gas and adsorbed on active sites on the surface, respectively.
Let be the fractional of surface coverage, that is, the fraction of active sites occupied
by adsorbed molecules. The fraction of free sites is then 1 . Langmuir derived that
the rate of desorption of molecules, rdes (mol/(m2s)), is proportional to and equal
to kr where kr is a constant at constant temperature. Furthermore, the rate of
adsorption of molecules is proportional to both the fraction of free surface sites, 1 ,
and to the rate of which molecules strike the surface. The collision rate is in turn
directly proportional the partial pressure of the species, pA (Pa). The rate of adsorption
in mol/(m2s) is thus rads = kfpA(1 ).
where kf is a constant at constant temperature.
2 |
TR A N S P O R T A N D A D S O R P T I O N
COMSOL
(1)
r ads = k ads c ( s c s )
(2)
and
where
kdes = kr/s is the rate constant for the desorption reaction (m3/(mols))
kads = kfRT/s is the rate constant for the adsorption reaction (1/s)
The material balance for the surface, including surface diffusion and the reaction rate
expression for the formation of the adsorbed species, cs, is:
c s
-------- + ( D s c s ) = r ads r des
t
where Ds represents surface diffusivity. This gives the following equation for the
transport and reaction on the surface:
c s
-------- + ( D s c s ) = k ads c ( s c s ) k des c s
t
COMSOL
3 |
(3)
TR A N S P O R T A N D A D S O R P T I O N
Equation 3 defines the units of the rate constants kads and kdes. The initial condition
is that the concentration of adsorbed species is zero at the beginning of the process:
cs = 0
The equation for the surface-reaction expression includes the concentration of the
bulk species, c, at the position of the catalyst surface. Thus you must solve the equation
for the surface reaction in combination with the mass balance in the bulk. The coupling
between the mass balance in the bulk and the surface is obtained as a boundary
condition in the bulks mass balance. This condition sets the flux of c at the boundary
equal to the rate of the surface reaction and is presented below. The transport in the
bulk of the reactor is described by a convection-diffusion equation:
----c+ ( D c + cu ) = 0
t
(4)
The boundary conditions for the surface species are insulating conditions according to:
n ( D s c s ) = 0
(5)
For the bulk, the boundary condition at the active surface couples the rate of the
reaction at the surface with the flux of the reacting species and the concentration of
the adsorbed species and bulk species:
n ( D c + cu ) = k ads c ( s c s ) + k des c s
4 |
TR A N S P O R T A N D A D S O R P T I O N
(6)
COMSOL
COMSOL
5 |
TR A N S P O R T A N D A D S O R P T I O N
6 |
TR A N S P O R T A N D A D S O R P T I O N
COMSOL
Increasing time
Figure 4: The concentration of adsorbed species increases with time. The edge effect appears
at both edges due to the increased supply of reactants. This figure displays the concentration
after 0.05, 0.5, 1.0, 1.5, and 2.0 s.
The concentration of gas phase species at the surface decreases while the surface
concentration of the adsorbed species increases with time. This implies that the
adsorption rate decreases with time. You can see this effect in Figure 5, which also
shows that after 0.5 s the reaction rate almost reaches steady-state. The upper curve
COMSOL
7 |
TR A N S P O R T A N D A D S O R P T I O N
shows the reaction rate after 0.05 s, while the lower curve represents the curves for 0.5,
1.0, 1.5, and 2.0 s, which are all on top of each other.
Increasing time
Figure 5: Surface reaction rate at the active surface. The largest reaction rate is obtained
initially and is at the edges of the active surface. The reaction process almost reaches steady
state at 0.5 s.
Modeling Instructions
MODEL WIZARD
4 In the Select physics tree, select Chemical Species Transport>Transport of Diluted Species
(chds).
8 |
TR A N S P O R T A N D A D S O R P T I O N
COMSOL
Parameters
A set of model parameters are available in a text file.
1 In the Model Builder window, right-click Global Definitions and choose Parameters.
2 Go to the Settings window for Parameters.
3 Locate the Parameters section. Click Load from File.
4 Browse to the models Model Library folder and double-click the file
transport_and_adsorption_parameters.txt.
NAME
EXPRESSION
DESCRIPTION
c0
1000[mol/m^3]
Initial concentration
k_ads
1e-6[m^3/(mol*s)]
k_des
1e-9[1/s]
Gamma_s
1000[mol/m^2]
Ds
1e-11[m^2/s]
Surface diffusivity
1e-9[m^2/s]
Gas diffusivity
v_max
1[mm/s]
Maximum velocity
delta
0.1[mm]
Channel width
GEOMETRY 1
COMSOL
9 |
TR A N S P O R T A N D A D S O R P T I O N
Rectangle 1
1 Right-click Geometry 1 and choose Rectangle.
2 Go to the Settings window for Rectangle.
3 Locate the Size section. In the Width edit field, type 0.1.
4 In the Height edit field, type 0.3.
5 Locate the Position section. In the y edit field, type -0.1.
6 Click the Build All Objects button.
Point 1
1 In the Model Builder window, right-click Geometry 1 and choose Point.
2 Go to the Settings window for Point.
3 Locate the Point section. In the x edit field, type 0.1.
4 Click the Build All Objects button.
Point 2
1 In the Model Builder window, right-click Geometry 1 and choose Point.
2 Go to the Settings window for Point.
3 Locate the Point section. In the x edit field, type 0.1.
4 In the y edit field, type 0.1.
5 Click the Build All Objects button.
6 Click the Zoom Extents button on the Graphics toolbar.
DEFINITIONS
Variables 1
1 In the Model Builder window, right-click Component 1>Definitions and choose Variables.
2 Go to the Settings window for Variables.
3 Locate the Geometric Entity Selection section. From the Geometric entity level list,
choose Boundary.
4 Select Boundary 5 only.
5 Go to the Settings window for Variables.
6 Locate the Variables section. In the Variables table, enter the following settings:
10 |
NAME
EXPRESSION
DESCRIPTION
k_ads*c*(Gamma_s-cs)-k_des*cs
TR A N S P O R T A N D A D S O R P T I O N
COMSOL
Variables 2
1 In the Model Builder window, right-click Definitions and choose Variables.
2 Go to the Settings window for Variables.
3 Locate the Geometric Entity Selection section. From the Geometric entity level list,
choose Domain.
4 Select Domain 1 only.
5 Locate the Variables section. In the Variables table, enter the following settings:
NAME
EXPRESSION
DESCRIPTION
v_lam
v_max*(1-((x-0.5*delta)/
(0.5*delta))^2)
TR A N S P O R T O F D I L U T E D S P E C I E S
v_lam
Initial Values 1
1 In the Model Builder window, click Transport of Diluted Species>Initial Values 1.
2 Go to the Settings window for Initial Values.
3 Locate the Initial Values section. In the c edit field, type c0.
Reactions 1
1 In the Model Builder window, right-click Transport of Diluted Species and choose
Reactions.
2 Select Domain 1 only.
Concentration 1
1 In the Model Builder window, right-click Transport of Diluted Species and choose
Concentration.
2 Select Boundary 2 only.
COMSOL
11 |
TR A N S P O R T A N D A D S O R P T I O N
Flux 1
1 In the Model Builder window, right-click Transport of Diluted Species and choose Flux.
2 Select Boundary 5 only.
3 Go to the Settings window for Flux.
4 Locate the Inward Flux section. Select the Species c check box.
5 In the N0,c edit field, type -R.
Outflow 1
1 In the Model Builder window, right-click Transport of Diluted Species and choose
Outflow.
2 Select Boundary 3 only.
Symmetry 1
1 In the Model Builder window, right-click Transport of Diluted Species and choose
Symmetry.
2 Select Boundaries 1, 4, and 6 only.
Next, set up the equation and boundary conditions for the surface concentration, cs.
PDE
1 In the Model Builder window, click Model 1>Weak Form Boundary PDE.
2 Go to the Settings window for PDE.
3 Locate the Boundary Selection section. From the Selection list, choose Manual.
4 Click Clear Selection.
5 Select Boundary 5 only.
6 Locate the Units section. From the Dependent variable quantity list, choose None.
7 In the Unit edit field, type mol/m^2.
8 In the Unit edit field for the Source term quantity, type mol/(m^2*s).
12 |
TR A N S P O R T A N D A D S O R P T I O N
COMSOL
3 Locate the Weak Expressions section. In the weak edit field, type
Ds*(-test(csTx)*csTx-test(csTy)*csTy)+test(cs)*(R-cst).
In this expression, csTx and csTy refer to the x-component and y-component of
the projection of the gradient of the dependent variable cs to the tangential plane
at the boundary. Because Boundary 5, where the Weak Form Boundary PDE is
defined, is parallel to the y-axis, csTx happens to be identically zero in this case.
Moreover, cst is the time derivative of cst, and test() is the test function operator.
Pointwise Constraint 1
1 In the Model Builder, right-click Weak Form Boundary PDE and choose More>Pointwise Constraint.
2 Go to the Settings window for Pointwise Constraint.
3 Locate the Point Selection section. From the Selection list, select All points.
4 Select Vertices 4 and 5 only.
5 Locate the Pointwise Constraint section. From the Constraint type list, select User
defined.
ME SH 1
Free Triangular 1
In the Model Builder window, right-click Component 1>Mesh 1 and choose Free Triangular.
Size 1
1 In the Model Builder window, right-click Mesh 1>Free Triangular 1 and choose Size.
2 Go to the Settings window for Size.
3 Locate the Geometric Entity Selection section. From the Geometric entity level
check box.
7 In the associated edit field, type 1.5[um].
COMSOL
13 |
TR A N S P O R T A N D A D S O R P T I O N
STUDY 1
Concentration (chds)
The first default plot shows the concentration of the reacting species at the end of the
simulation interval, t = 2 s.
Next, create a plot of the final concentration at the reacting surface.
1D Plot Group 3
1 In the Model Builder window, right-click Results and choose 1D Plot Group.
2 Go to the Settings window for 1D Plot Group.
3 Locate the Data section. From the Time selection list, choose From list.
14 |
TR A N S P O R T A N D A D S O R P T I O N
COMSOL
1D Plot Group 4
1 In the Model Builder window, right-click 1D Plot Group 3 and choose Duplicate.
2 Go to the Settings window for 1D Plot Group.
3 Locate the Data section. In the Time list, choose 0.05, 0.5, 1, 1.5, and 2.
4 In the Model Builder window, expand the 1D Plot Group 4 node, then click Line Graph
1.
5 Go to the Settings window for Line Graph.
6 In the upper-right corner of the y-Axis Data section, click Replace Expression.
7 From the menu, choose Weak Form Boundary PDE>Dependent variable cs (cs).
8 Click the Plot button.
Finally, reproduce the plot in Figure 5 of the surface reaction rate at the same times.
Again, use the previous plot group as the starting point.
1D Plot Group 5
1 In the Model Builder window, right-click 1D Plot Group 4 and choose Duplicate.
2 Expand the 1D Plot Group 5 node, then click Line Graph 1.
3 Go to the Settings window for Line Graph.
4 In the upper-right corner of the y-Axis Data section, click Replace Expression.
5 From the menu, choose Definitions>Surface reaction rate (R).
6 Click the Plot button.
COMSOL
15 |
TR A N S P O R T A N D A D S O R P T I O N
COMSOL MULTIPHYSICS
- ODE & DAE Interfaces -
Model Definition
The model couples the flow simulation in cylindrical coordinates with an ODE for the
force balance of the particle. Due to axial symmetry, you can model the flow in 2D
instead of 3D. The figure below shows the modeling domain.
COMSOL
1 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
DOMAIN EQUATIONS
u
T
( u + ( u ) ) + u u + p = F
t
u = 0
where denotes the density (kg/m3), u the velocity (m/s), the viscosity (Ns/m2),
and p the pressure (Pa). The fluid is water with a viscosity of 1.51103 Ns/m2 and a
density of 1000 kg/m3. The model uses the accelerating reference system of the sand
grain. This means that the volume force density F is given by:
F r = 0,
Fz = ( a + g )
where a (m/s2) is the acceleration of the grain and g = 9.81 m/s2 is the acceleration
due to gravity. The ODE that describes the force balance is:
mx = F g + F z
where m (kg) denotes the mass of the particle, x (m) the position of the particle, Fg
(N) the gravitational force, and Fz the z-component of the force that the water exerts
on the sand grain. The gravitational force is given by:
F g = grain V grain g
where Vgrain (m3) is the volume of the sand grain and grain (kg/m3) its density. The
force that the water exerts on the grain is calculated by integrating the normal
component of the stress tensor over the surface of the particle. Because the model is
axially symmetric, only the forces z-component is nonzero:
F z = 2 rn [ pI + ( u + ( u ) ) ] dS
S
where r (m) is the radial coordinate and n is the normal vector on the surface of the
grain.
At the spheres surface, the fluid velocity relative the sphere is zero, that is u = 0a
situation described by the no-slip wall condition. At the inlet of the fluid domain the
velocity equals the falling velocity: u = ( 0, x ) . At the outer boundary of the water
2 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
COMSOL
domain, the normal velocity and the tangential shear stress both vanish, which means
that a symmetry condition applies. Furthermore, a neutral condition,
n [pI + (u + (u)T)] = 0, describes the outlet, and an axial symmetry condition
models the symmetry axis at r = 0.
Results
Figure 1 shows the velocity field at the final simulation time, t = 1 s, when the particle
has reached steady state.
Figure 1: The velocity field at steady state. Note that the velocities are plotted in the
reference system of the sand grain.
The following series of snapshots (Figure 2) displays velocity field from a moment just
after the sand grain is released until it is approaching steady state. Notice the
recirculation forming above the grain.
COMSOL
3 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
Figure 2: The velocity field around the sand grain at a series of times (t = 0.025 s, 0.05 s,
0.075 s, 0.1 s, 0.15 s, 0.2 s, 0.3 s, 0.5 s, and 0.75 s). For a color legend, see Figure 1.
4 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
C O M S O L
Figure 3: Falling velocity (m/s) of the grain versus time. After the solution time of 1 s, the
velocity approaches the terminal velocity.
The terminal velocity equals 0.291 m/s. When this state is reached, the gravity and the
forces from the water cancel out. Figure 4 shows the forces on the sand grain.
Figure 4: The forces on the sand grain. The force that the water exerts on the sphere (blue
line) increases as the grain gains speed. The gravity force (red line) remains the same, and
the total force (black line) tends toward zero as the solution approaches steady state.
COMSOL
5 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
Several approximate equations have been proposed for the terminal velocity of a sphere
falling in a fluid. Ref. 1 cites the following expression for the total force that the fluid
exerts on the sphere, as a function of the velocity:
2 2
0.31
0.06 3.45
F = --- d v ( 1.84Re
+ 0.293Re
)
4
Here d (m) is the diameter of the sphere, (kg/m3) is the fluid density, v (m/s) is the
velocity, and Re = (vd)/ is the Reynolds number, with (Ns/m2) being the viscosity
of the fluid. The gravity force is given analytically as Fg = d3( s)g/6, where
s (kg/m3) is the density of the sphere. Equating the two forces and introducing the
values used in the simulation gives an approximate terminal velocity of 0.284 m/s.
The same reference discusses correction factors for nonspherical particles. You can
easily adapt the model to hold for a general axially symmetric object (by redrawing the
geometry) or even an arbitrarily shaped object (by modeling in 3D).
Reference
1. J.M. Coulson and J.F. Richardson, Chemical Engineering vol. 2, 4th ed., 1993.
Modeling Instructions
MODEL WIZARD
6 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
COMSOL
Parameters
1 In the Model Builder window, right-click Global Definitions and choose Parameters.
2 In the Parameters settings window, locate the Parameters section.
3 Click Load from File.
4 Browse to the models Model Library folder and double-click the file
falling_sand_parameters.txt.
GEOMETRY 1
Rectangle 1
1 In the Model Builder window, under Component 1 right-click Geometry 1 and choose
Rectangle.
2 In the Rectangle settings window, locate the Size section.
3 In the Width edit field, type 6e-3.
4 In the Height edit field, type 14e-3.
5 Locate the Position section. In the z edit field, type -6e-3.
6 Click the Build Selected button.
Circle 1
1 In the Model Builder window, right-click Geometry 1 and choose Circle.
2 In the Circle settings window, locate the Size and Shape section.
3 In the Radius edit field, type 1e-3.
4 Click the Build Selected button.
Difference 1
1 Right-click Geometry 1 and choose Boolean Operations>Difference.
2 In the Difference settings window, locate the Difference section.
3 Under Objects to add, click Activate Selection.
4 Select the object r1 only.
5 Under Objects to subtract, click Activate.
6 Select the object c1 only.
7 Click the Build Selected button.
COMSOL
7 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
DEFINITIONS
Integration 1
1 In the Model Builder window, under Component 1 right-click Definitions and choose
Component Couplings>Integration.
2 In the Integration settings window, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundaries 6 and 7 only.
5 Locate the Advanced section. From the Method list, choose Summation over nodes.
Variables 1
1 In the Model Builder window, right-click Definitions and choose Variables.
2 In the Variables settings window, locate the Variables section.
3 In the table, enter the following settings:
Name
Expression
Description
F_z
intop1(-reacf(w))
Drag force
Here, w is the z-component of the fluid velocity and reacf() is the reaction force
operator.
LAMINAR FLOW
Fluid Properties 1
1 In the Model Builder window, expand the Laminar Flow node, then click Fluid
Properties 1.
2 In the Fluid Properties settings window, locate the Fluid Properties section.
3 From the list, choose User defined. In the associated edit field, type rho_water.
4 From the list, choose User defined. In the associated edit field, type mu_water.
Volume Force 1
1 In the Model Builder window, right-click Laminar Flow and choose Volume Force.
2 In the Volume Force settings window, locate the Domain Selection section.
3 From the Selection list, choose All domains.
8 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
C O M S O L
4 Locate the Volume Force section. In the F table, enter the following settings:
0
-rho_water*(Xdott+g_const)
Next, add a Global Equations node for the equation of motion for the falling grain. By
default, this feature is not visible.
1 In the Model Builder windows toolbar, click the Show button and select Advanced
Physics Options in the menu.
Global Equations 1
1 Right-click Laminar Flow and choose Global>Global Equations.
f(u,ut,utt,t)
Xt-Xdot
Xdot
Xdott-(F_z+F_g)/m_grain
Inlet 1
1 Right-click Laminar Flow and choose Inlet.
2 Select Boundary 2 only.
3 In the Inlet settings window, locate the Velocity section.
4 In the U0 edit field, type -Xdot.
Open Boundary 1
1 Right-click Laminar Flow and choose Open Boundary.
2 Select Boundary 4 only.
Wall 2
1 Right-click Laminar Flow and choose Wall.
2 In the Wall settings window, locate the Boundary Condition section.
3 From the Boundary condition list, choose Slip.
4 Select Boundary 5 only.
COMSOL
9 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
MESH 1
Free Triangular 1
In the Model Builder window, under Component 1 right-click Mesh 1 and choose Free
Triangular.
Size 1
1 In the Model Builder window, under Component 1>Mesh 1 right-click Free Triangular 1
box.
7 In the associated edit field, type 1.5e-4.
Size 2
1 Right-click Free Triangular 1 and choose Size.
2 In the Size settings window, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundaries 6 and 7 only.
5 Locate the Element Size section. Click the Custom button.
6 Locate the Element Size Parameters section. Select the Maximum element size check
box.
7 In the associated edit field, type 0.75e-4.
Size
1 In the Model Builder window, under Model 1>Mesh 1 click Size.
2 In the Size settings window, locate the Element Size section.
3 From the Predefined list, choose Finer.
4 Locate the Element Size Parameters section. In the Maximum element growth rate edit
10 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
COMSOL
STUDY 1
Solver 1
1 In the Model Builder window, expand the Study 1>Solver Configurations>Solver 1
section.
3 From the Steps taken by solver list, choose Intermediate.
This setting forces the solver to take at least one step in each of the time intervals
you specified.
4 In the Model Builder window, right-click Study 1 and choose Compute.
RESULTS
Velocity (spf)
The default plot shows the velocity magnitude as a surface plot. Add a streamline plot
of the velocity field by following the steps below.
1 In the Model Builder window, under Results right-click Velocity (spf) and choose
Streamline.
2 In the Streamline settings window, locate the Streamline Positioning section.
3 From the Positioning list, choose Magnitude controlled.
4 Locate the Coloring and Style section. From the Color list, choose Black.
5 Click the Plot button.
6 Click the Zoom Extents button on the Graphics toolbar.
Visualize the approach to this steady state by creating the series of snapshots of the
velocity field (Figure 2).First, fix the color range for the surface plot to get the same
color-to-velocity mapping for all time steps.
7 In the Model Builder window, under Results>Velocity (spf) click Surface 1.
COMSOL
11 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
Export
COMSOL Multiphysics generates a movie and then plays it.
To replay the movie, click the Play button on the Graphics toolbar. If you want to
export a movie in GIF, Flash, or AVI format, right-click Export and create an
Animation feature.
Next, visualize the grain's downward velocity as a function of time.
1D Plot Group 4
1 In the Model Builder window, right-click Results and choose 1D Plot Group.
2 In the 1D Plot Group settings window, click to expand the Title section.
3 From the Title type list, choose None.
4 Locate the Plot Settings section. Select the x-axis label check box.
5 In the associated edit field, type Time (s).
6 Select the y-axis label check box.
7 In the associated edit field, type Grain speed (m/s).
8 Right-click Results>1D Plot Group 4 and choose Point Graph.
9 Select Point 1 only.
10 In the Point Graph settings window, locate the y-Axis Data section.
11 In the Expression edit field, type -Xdot.
12 Click the Plot button.
12 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
COMSOL
To view all the forces in the same figure, follow the steps given below.
1D Plot Group 5
1 In the Model Builder window, right-click Results and choose 1D Plot Group.
2 In the 1D Plot Group settings window, locate the Title section.
3 From the Title type list, choose None.
4 Locate the Plot Settings section. Select the x-axis label check box.
5 In the associated edit field, type Time (s).
6 Select the y-axis label check box.
7 In the associated edit field, type F<sub>z</sub>, F<sub>g</sub>, and
F<sub>g</sub>+F<sub>z</sub> (N).
The HTML tags 'sub' and 'sup' give subscripts and superscripts, respectively.
8 Right-click Results>1D Plot Group 5 and choose Point Graph.
9 Select Point 1 only.
10 In the Point Graph settings window, click Replace Expression in the upper-right
corner of the y-Axis Data section. From the menu, choose Definitions>Drag force
(F_z).
11 Click to expand the Coloring and Style section. Find the Line style subsection. From
COMSOL
13 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
14 |
TE R M I N A L F A L L I N G V E L O C I T Y O F A S A N D G R A I N
C O M S O L