Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Finite volume method
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example== Consider a simple 1D [[advection]] problem: {{NumBlk|:|<math>\frac{\partial\rho}{\partial t}+\frac{\partial f}{\partial x}=0,\quad t\ge0.</math>|{{EquationRef|1}}}} Here, <math> \rho=\rho \left( x,t \right) </math> represents the state variable and <math> f=f \left( \rho \left( x,t \right) \right) </math> represents the [[flux]] or flow of <math> \rho </math>. Conventionally, positive <math> f </math> represents flow to the right while negative <math> f </math> represents flow to the left. If we assume that equation ({{EquationNote|1}}) represents a flowing medium of constant area, we can sub-divide the spatial domain, <math> x </math>, into ''finite volumes'' or ''cells'' with cell centers indexed as <math> i </math>. For a particular cell, <math> i </math>, we can define the ''volume average'' value of <math> {\rho }_i \left( t \right) = \rho \left( x, t \right) </math> at time <math> {t=t_1} </math> and <math>{ x \in \left[ x_{i-1/2} , x_{i+1/2} \right] } </math>, as {{NumBlk|:|<math>\bar{\rho}_i \left( t_1 \right) = \frac{1}{ x_{i+1/2} - x_{i-1/2}} \int_{x_{i-1/2}}^{x_{i+1/2}} \rho \left(x,t_1 \right)\, dx ,</math>|{{EquationRef|2}}}} and at time <math> t = t_2 </math> as, {{NumBlk|:|<math>\bar{\rho}_i \left( t_2 \right) = \frac{1}{x_{i+1/2} - x_{i-1/2}} \int_{x_{i-1/2}}^{x_{i+1/2}} \rho \left(x,t_2 \right)\, dx ,</math>|{{EquationRef|3}}}} where <math> x_{i-1/2} </math> and <math> x_{i+1/2} </math> represent locations of the upstream and downstream faces or edges respectively of the <math> i^\text{th} </math> cell. Integrating equation ({{EquationNote|1}}) in time, we have: {{NumBlk|:|<math>\rho \left( x, t_2 \right) = \rho \left( x, t_1 \right) - \int_{t_1}^{t_2} f_x \left( x,t \right)\, dt,</math>|{{EquationRef|4}}}} where <math>f_x=\frac{\partial f}{\partial x}</math>. To obtain the volume average of <math> \rho\left(x,t\right) </math> at time <math> t=t_{2} </math>, we integrate <math> \rho\left(x,t_2 \right) </math> over the cell volume, <math>\left[ x_{i-1/2} , x_{i+1/2} \right] </math> and divide the result by <math>\Delta x_i = x_{i+1/2}-x_{i-1/2} </math>, i.e. {{NumBlk|:|<math> \bar{\rho}_{i}\left( t_{2}\right) =\frac{1}{\Delta x_i}\int_{x_{i-1/2}}^{x_{i+1/2}}\left\{ \rho\left( x,t_{1}\right) - \int_{t_{1}}^{t_2} f_{x} \left( x,t \right) dt \right\} dx.</math>|{{EquationRef|5}}}} We assume that <math> f \ </math> is well behaved and that we can reverse the order of integration. Also, recall that flow is normal to the unit area of the cell. Now, since in one dimension <math>f_x \triangleq \nabla \cdot f </math>, we can apply the [[divergence theorem]], i.e. <math>\oint_{v}\nabla\cdot fdv=\oint_{S}f\, dS </math>, and substitute for the volume integral of the [[divergence]] with the values of <math>f(x) </math> evaluated at the cell surface (edges <math>x_{i-1/2} </math> and <math> x_{i+1/2} </math>) of the finite volume as follows: {{NumBlk|:|<math> \bar{\rho}_i \left( t_2 \right) = \bar{\rho}_i \left( t_1 \right) - \frac{1}{\Delta x_{i}} \left( \int_{t_1}^{t_2} f_{i + 1/2} dt - \int_{t_1}^{t_2} f_{i - 1/2} dt \right) .</math>|{{EquationRef|6}}}} where <math>f_{i \pm 1/2} =f \left( x_{i \pm 1/2}, t \right) </math>. We can therefore derive a ''semi-discrete'' numerical scheme for the above problem with cell centers indexed as <math> i </math>, and with cell edge fluxes indexed as <math> i\pm1/2 </math>, by differentiating ({{EquationNote|6}}) with respect to time to obtain: {{NumBlk|:|<math> \frac{d \bar{\rho}_i}{d t} + \frac{1}{\Delta x_i} \left[ f_{i + 1/2} - f_{i - 1/2} \right] =0 ,</math>|{{EquationRef|7}}}} where values for the edge fluxes, <math> f_{i \pm 1/2} </math>, can be reconstructed by [[interpolation]] or [[extrapolation]] of the cell averages. Equation ({{EquationNote|7}}) is ''exact'' for the volume averages; i.e., no approximations have been made during its derivation. This method can also be applied to a [[Finite volume method for two dimensional diffusion problem|2D]] situation by considering the north and south faces along with the east and west faces around a node.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)