Tuesday, June 9, 2015

Model and Simulation: Equations

Equations describe the interrelations between various parameters.

Algebraic Equation:

  • Linear equation, solved by matrix inversion
  • Non-linear equation, solved by linearisation or non-linear optimization

A non-linear equation $ F(\vec{x})=\vec{0}$ can be written by

\[ F(\vec{x})=\vec{R}
\]

where, $\vec{x}$, $\vec{0}$ and $\vec{R}$ are vectors.

R are the residuals and the objective function becomes $|\vec{R}|$, which is to be minimized.

By linearisation, the set of non-linear equations can be converted to,

\[ F_{i}(\vec{x})=-\sum_{j}J_{ij}(\vec{x})\triangle x_{j}
\]

where, $J_{ij}(\vec{x})=\frac{\partial F_{i}(\vec{x})}{\partial x}$.

An initial guess is required to start this iterative solving process. The Jacobian matrix is estimated using the values of x from the previous iteration until the right-hand side becomes less than the tolerance.

Various optimization methods can be used to search the optima within a given range. The problems can be

  1. The obtained optima is local optima or there are multiple optima -- Genetic Algorithm, Simulated Annealing
  2. The solution won't converge or stick at particle values -- try different methods or change the initial guess
Again, the choice of initial guess is very important.


Differential Equations:
If only one type of derivative is involve, the equation is called ODE, ordinary differential equation, as opposed to PDE, partial differential equation.

A Cauchy problem in mathematics asks for the solution of a partial differential equation that satisfies certain conditions which are given on a hypersurface in the domain. A Cauchy problem can be an initial value problem (given initial value, how the system evolves with time) or a boundary value problem (specifying the boundary condition instead), but it can be none of them. Cauchy boundary conditions require both the function value and normal derivative on the boundary of the domain (a Dirichlet and a Neumann boundary condition) to ensure a unique solution.

Sometimes, PDEs are converted into simultaneous ODEs or algebraic equations (a large system of coupled ODEs with derivatives with respect to time). When the phenomena vary with time, the spatial variables are discretised and time is considered a continuous variable. Such as parabolic and hyperbolic equations in unsteady-state models. This method is termed a "method-of-line".

In steady state models, spatial discretisation results in algebraic equations. Such as elliptic equations.


Differential-Algebraic Equations:

DAEs, these types of mixed equations contain unsteady-state material and energy balance equations, equilibrium relationships, consistency equations etc.


Other Equation Type Classification:

Homogeneous Function:
If x is the solution of the function, so is $\lambda x$.
\[ f(\lambda x)=\lambda^{n}f(x)
\]


Homogeneous linear differential equations:
 If  $\phi(x)$  is a solution, so is  $c \phi(x)$. In another word, each term in a linear differential equation must contain y or any derivative of y, such as $ \sin(x) \frac{d^2y}{dx^2} + 4 \frac{dy}{dx} + y = 0 $.

Second order differential equations:

\[ Au_{xx} + 2Bu_{xy} + Cu_{yy} + Du_x + Eu_y + F = 0
\]

If $B^2 - AC > 0$, hyperbolic partial differential equation;
If $B^2 - AC = 0$, parabolic PDE;
If $B^2 - AC < 0$, elliptic PDE.

The most famous wave equation is a hyperbolic PDE. In one spatial dimension, this is $u_{tt} - u_{xx} = 0$.

Source of Equations:
The source of the equations depends on the field of application and the knowledge of the modeler.

Empirical Equations:
These can be obtained by fitting the experimental data in terms of important parameters with somem simple functions. The relation can explicit or implicit (friction factor by McCable et al. 1993).

Based on theoretical concepts:
Such as the calculation/estimation of thermodynamic properties.

Consistency Equations:
Based on the fact that the fractional composition of each component should add up to 1, in terms of mole and mass.

Law of conservation:
Such as equation of continuity and the momentum-balance equation with considerations of energy/mass generation or depletion in chemical reaction, viscous dissipation, electrical or electrochemical effects on the flow and other phenomena. The generalized equation of change is known as the Navier-Stokes equation.

Integration/Averaging:
Flow rate is obtained by integrating the velocity over the cross-sectional area;
Average velocity is then obtained by division of the total area.
Also, number-averaged particle diameter, porosity...

Population Balance:
Discrete event model considers the birth and death of population (breakage, agglomeration or coalescence).

References:
Verma, Ashok Kumar. 2014. Process Modelling and Simulation in Chemical, Biochemical and Environmental Engineering. CRC Press.

No comments:

Post a Comment