http://www.cfd-online.com/W/index.php?title=Special:Contributions/Momidyeg&feed=atom&limit=50&target=Momidyeg&year=&month=CFD-Wiki - User contributions [en]2016-09-29T04:22:34ZFrom CFD-WikiMediaWiki 1.16.5http://www.cfd-online.com/Wiki/Discretization_of_the_transient_termDiscretization of the transient term2007-07-19T18:40:33Z<p>Momidyeg: /* First order downwind or forward Euler scheme */</p>
<hr />
<div>=Introduction=<br />
To account for transient effects, the governing equations must be discretized in time. As it turns out, the temporal discretization is slightly easier to deal with than that for the spatial effects. Since the governing equation is hyperbolic/parabolic in time, the solution at time '''t''' depends upon its history and not on its future. Transient effects are usually dealt with by using a time stepping procedure, with an initial condition provided. The time dimension is divided into a set of discrete time steps, each of size <math>\Delta t \,</math>. The solution algorithm therefore marches forward in time, computing a solution at each time step. The spatial discretization for the time-dependent equations is identical to the steady-state case. <br><br />
Temporal discretization involves the integration of every term in the differential equations over the time step <math>\Delta t \,</math>. The integration of transient effects takes several forms, each yielding a different accuracy. For simplicity, we express the time dependent transport of a scalar <math> \phi \,</math> as <br><br />
<math> \frac {\partial (\rho \phi)} {\partial t} = l(\phi) </math> <br><br />
where the function <math> l \,</math> is an operator that incorporates all of the non-transient terms, namely: diffusion, convection, and source terms.<br><br />
Integrating the above equation over a control volume yields <br><br />
<math> \int_{V} \frac {\partial (\rho \phi)} {\partial t} dV= \int_{V} l(\phi) dV</math> <br><br />
After the spatial dicretization has been performed using the techniques described in the other sections, we obtain <br><br />
<math> \frac {\partial (\rho \phi)} {\partial t} V= L(\phi)</math> <br><br />
where L denotes the spatial discretization operator (the discretized diffusion, convection, and source terms), and V denotes the volume. <br><br />
<br />
At this point, we make an important observation. The temporal discretization of the transient term (Left Hand Side, LHS) need not be the same as that of the discretized diffusion, convection and source terms (Right Hand Side, RHS). Each term can be treated differently yield different accuracies. <br />
<br />
We are now ready to perform the transient discretization. In the framework of the finite volume method, There are various methods that can be used to perform this task, the most popular of which are the Euler explicit, Euler implicit, Crank-Nicolson, and the fully implicit schemes. The temporal discretization of the diffusion, convection, and source terms will be presented first followed by the methods used for the transient term.<br />
<br />
==Temporal discretization of the diffusion, convection, and source terms==<br />
For a given control volume P, The RHS of the general discretized equation (<math>L(\phi)</math>) contains terms involving values at P and its neighboring control volumes. The temporal discretization is carried out through an integration over time of the RHS where each unknown is involved in the process. We assume the values at a given control volume are known at an initial time ''t'' and we are interested in obtaining the values at time <math> t + \Delta t \,</math>. This method states that the time integral of a given variable is equal to a weighted average between existing and future values. This is written as <br><br />
<math> \int_{t}^{t+\Delta t} \phi \,dt = \Big [ f \phi^{t+\Delta t} + (1-f)\phi^t \Big ] \Delta t </math> <br><br />
where f is a weighing factor between 0 and 1. The following remarks hold<br />
* f = 0 results in the fully explicit scheme<br />
* f = 1 results in the fully implicit scheme<br />
* f = 0.5 results in the Crank-Nicolson scheme<br />
<br><br />
This integration holds true for any discretized variable at any control volume. When applied to the full discretized diffusion, convection, and source terms, we have the following <br><br />
<math> \int_{t}^{t+\Delta t} L(\phi) \, dt = \Big [ f L_{\phi}^{t+\Delta t} + (1-f)L_{\phi}^{t} \Big ] \Delta t </math> <br><br />
where we have placed phi as a subscript for clarity.<br />
<br />
==Temporal discretization of the transient term ==<br />
We now direct our attention to the temporal discretization of the transient term. This time, we perform a "dummy" integration between <math>t - \frac{1}{2} \Delta t</math> and <math>t+\frac{1}{2} \Delta t</math>. At the outset, we obtain <br><br />
<math> \int_{t- \frac{1}{2}\Delta t}^{t+\frac{1}{2}\Delta t} \frac {\partial (\rho \phi)} {\partial t} dV= \frac {(\rho \phi)^{t+\frac{1}{2}\Delta t} - (\rho \phi)^{t-\frac{1}{2}\Delta t}}{\Delta t} V</math> <br><br />
The choice of the values for <math>(\rho \phi)^{t-\frac{1}{2}\Delta t}</math> and <math>(\rho \phi)^{t+\frac{1}{2}\Delta t}</math> will yield different accuracies. Below are some of the options.<br />
<br />
<br />
=== First order upwind or backward Euler scheme ===<br />
In this scheme, the value for <math>(\rho \phi)^{t \pm \frac{1}{2}\Delta t}</math> is taken to be the upwind value of the temporal control volume, i.e. <br><br />
<math>(\rho \phi)^{t + \frac{1}{2}\Delta t} = (\rho \phi)^{t}</math> <br><br />
<math>(\rho \phi)^{t - \frac{1}{2}\Delta t} = (\rho \phi)^{t - \Delta t}</math> <br><br />
Using this scheme, with a consistent RHS of the discretized equation will yield an implicit set of equations that require an iterative solution procedure.<br />
<br />
=== First order downwind or forward Euler scheme ===<br />
In this scheme, the value for <math>(\rho \phi)^{t \pm \frac{1}{2}\Delta t}</math> is taken to be the downwind value of the temporal control volume, i.e. <br><br />
<math>(\rho \phi)^{t + \frac{1}{2}\Delta t} = (\rho \phi)^{t+\Delta t}</math> <br><br />
<math>(\rho \phi)^{t - \frac{1}{2}\Delta t} = (\rho \phi)^{t}</math> <br><br />
Using this scheme, with a consistent RHS of the discretized equation will yield an explicit set of equations that do not require an iterative solution procedure.<br />
<br />
=== Second order upwind or Adams-Bashforth scheme ===<br />
Using a second order '''transient''' expansion, we obtain <br><br />
<math>(\rho \phi)^{t + \frac{1}{2}\Delta t} =\frac{3}{2} (\rho \phi)^{t} - \frac{1}{2} (\rho \phi)^{t-\Delta t}</math> <br><br />
<math>(\rho \phi)^{t - \frac{1}{2}\Delta t} =\frac{3}{2} (\rho \phi)^{t- \Delta t} - \frac{1}{2} (\rho \phi)^{t-2\Delta t}</math> <br><br />
This will yield an implicit system of second order accuracy with the extra storage of one additional time step.<br />
<br />
<br />
-----'''To be continued'''-----<br />
<br />
{{stub}}</div>Momidyeghttp://www.cfd-online.com/Wiki/Discretization_of_the_transient_termDiscretization of the transient term2007-07-19T18:40:12Z<p>Momidyeg: /* First order upwind or backward Euler scheme */</p>
<hr />
<div>=Introduction=<br />
To account for transient effects, the governing equations must be discretized in time. As it turns out, the temporal discretization is slightly easier to deal with than that for the spatial effects. Since the governing equation is hyperbolic/parabolic in time, the solution at time '''t''' depends upon its history and not on its future. Transient effects are usually dealt with by using a time stepping procedure, with an initial condition provided. The time dimension is divided into a set of discrete time steps, each of size <math>\Delta t \,</math>. The solution algorithm therefore marches forward in time, computing a solution at each time step. The spatial discretization for the time-dependent equations is identical to the steady-state case. <br><br />
Temporal discretization involves the integration of every term in the differential equations over the time step <math>\Delta t \,</math>. The integration of transient effects takes several forms, each yielding a different accuracy. For simplicity, we express the time dependent transport of a scalar <math> \phi \,</math> as <br><br />
<math> \frac {\partial (\rho \phi)} {\partial t} = l(\phi) </math> <br><br />
where the function <math> l \,</math> is an operator that incorporates all of the non-transient terms, namely: diffusion, convection, and source terms.<br><br />
Integrating the above equation over a control volume yields <br><br />
<math> \int_{V} \frac {\partial (\rho \phi)} {\partial t} dV= \int_{V} l(\phi) dV</math> <br><br />
After the spatial dicretization has been performed using the techniques described in the other sections, we obtain <br><br />
<math> \frac {\partial (\rho \phi)} {\partial t} V= L(\phi)</math> <br><br />
where L denotes the spatial discretization operator (the discretized diffusion, convection, and source terms), and V denotes the volume. <br><br />
<br />
At this point, we make an important observation. The temporal discretization of the transient term (Left Hand Side, LHS) need not be the same as that of the discretized diffusion, convection and source terms (Right Hand Side, RHS). Each term can be treated differently yield different accuracies. <br />
<br />
We are now ready to perform the transient discretization. In the framework of the finite volume method, There are various methods that can be used to perform this task, the most popular of which are the Euler explicit, Euler implicit, Crank-Nicolson, and the fully implicit schemes. The temporal discretization of the diffusion, convection, and source terms will be presented first followed by the methods used for the transient term.<br />
<br />
==Temporal discretization of the diffusion, convection, and source terms==<br />
For a given control volume P, The RHS of the general discretized equation (<math>L(\phi)</math>) contains terms involving values at P and its neighboring control volumes. The temporal discretization is carried out through an integration over time of the RHS where each unknown is involved in the process. We assume the values at a given control volume are known at an initial time ''t'' and we are interested in obtaining the values at time <math> t + \Delta t \,</math>. This method states that the time integral of a given variable is equal to a weighted average between existing and future values. This is written as <br><br />
<math> \int_{t}^{t+\Delta t} \phi \,dt = \Big [ f \phi^{t+\Delta t} + (1-f)\phi^t \Big ] \Delta t </math> <br><br />
where f is a weighing factor between 0 and 1. The following remarks hold<br />
* f = 0 results in the fully explicit scheme<br />
* f = 1 results in the fully implicit scheme<br />
* f = 0.5 results in the Crank-Nicolson scheme<br />
<br><br />
This integration holds true for any discretized variable at any control volume. When applied to the full discretized diffusion, convection, and source terms, we have the following <br><br />
<math> \int_{t}^{t+\Delta t} L(\phi) \, dt = \Big [ f L_{\phi}^{t+\Delta t} + (1-f)L_{\phi}^{t} \Big ] \Delta t </math> <br><br />
where we have placed phi as a subscript for clarity.<br />
<br />
==Temporal discretization of the transient term ==<br />
We now direct our attention to the temporal discretization of the transient term. This time, we perform a "dummy" integration between <math>t - \frac{1}{2} \Delta t</math> and <math>t+\frac{1}{2} \Delta t</math>. At the outset, we obtain <br><br />
<math> \int_{t- \frac{1}{2}\Delta t}^{t+\frac{1}{2}\Delta t} \frac {\partial (\rho \phi)} {\partial t} dV= \frac {(\rho \phi)^{t+\frac{1}{2}\Delta t} - (\rho \phi)^{t-\frac{1}{2}\Delta t}}{\Delta t} V</math> <br><br />
The choice of the values for <math>(\rho \phi)^{t-\frac{1}{2}\Delta t}</math> and <math>(\rho \phi)^{t+\frac{1}{2}\Delta t}</math> will yield different accuracies. Below are some of the options.<br />
<br />
<br />
=== First order upwind or backward Euler scheme ===<br />
In this scheme, the value for <math>(\rho \phi)^{t \pm \frac{1}{2}\Delta t}</math> is taken to be the upwind value of the temporal control volume, i.e. <br><br />
<math>(\rho \phi)^{t + \frac{1}{2}\Delta t} = (\rho \phi)^{t}</math> <br><br />
<math>(\rho \phi)^{t - \frac{1}{2}\Delta t} = (\rho \phi)^{t - \Delta t}</math> <br><br />
Using this scheme, with a consistent RHS of the discretized equation will yield an implicit set of equations that require an iterative solution procedure.<br />
<br />
=== First order downwind or forward Euler scheme ===<br />
In this scheme, the value for <math>(\rho \phi)^{t \pm \frac{1}{2}\Delta t}</math> is taken the be the downwind value of the temporal control volume, i.e. <br><br />
<math>(\rho \phi)^{t + \frac{1}{2}\Delta t} = (\rho \phi)^{t+\Delta t}</math> <br><br />
<math>(\rho \phi)^{t - \frac{1}{2}\Delta t} = (\rho \phi)^{t}</math> <br><br />
Using this scheme, with a consistent RHS of the discretized equation will yield an explicit set of equations that do not require an iterative solution procedure.<br />
<br />
<br />
<br />
=== Second order upwind or Adams-Bashforth scheme ===<br />
Using a second order '''transient''' expansion, we obtain <br><br />
<math>(\rho \phi)^{t + \frac{1}{2}\Delta t} =\frac{3}{2} (\rho \phi)^{t} - \frac{1}{2} (\rho \phi)^{t-\Delta t}</math> <br><br />
<math>(\rho \phi)^{t - \frac{1}{2}\Delta t} =\frac{3}{2} (\rho \phi)^{t- \Delta t} - \frac{1}{2} (\rho \phi)^{t-2\Delta t}</math> <br><br />
This will yield an implicit system of second order accuracy with the extra storage of one additional time step.<br />
<br />
<br />
-----'''To be continued'''-----<br />
<br />
{{stub}}</div>Momidyeg