Changes between Version 4 and Version 5 of u/johannjc/scratchpad24


Ignore:
Timestamp:
03/22/17 13:31:09 (8 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/johannjc/scratchpad24

    v4 v5  
    6464
    65651.  Spatial reconstruction and averaging of solution over domain $\lambda \Delta t$ to get interface states
    66 2. Application of source term to interface states over $\Delta t/2$
     662. Application of source term to interface states over $\Delta t/2$ (or estimate source terms using cell centers)
    67673. Calculate Fluxes from interface states
    68684. Update Cells using those fluxes
     
    7272
    7373=== CTU ===
     74
     75Corner Transport Upwind attempts to modify predictor interface states with transverse flux corrections.
     76
     771.  Spatial reconstruction and averaging of solution over domain $\lambda \Delta t$ to get interface states
     782. Application of source term to interface states over $\Delta t/2$ (or estimate source terms using cell centers)
     793. Calculate Fluxes from interface states
     804. Update interface states with transverse fluxes
     815. Calculate new Fluxes
     826. Update Cells using those fluxes
     837. Calculate source term using time averaged cell center
     848. Update final states using source term for $\Delta t$
     85
     86
     87=== Variant for source terms involving force fields (ie gradients) ===
     88If the source terms can be directionally split, then the above algorithm can be modified as follows
     89
     901.  Spatial reconstruction and averaging of solution over domain $\lambda \Delta t$ to get interface states
     912. Application of parallel source term to interface states over $\Delta t/2$ (or estimate source terms using cell center)
     923. Calculate Fluxes from interface states
     934. Update interface states with transverse fluxes
     945. Apply perpendicular source terms to interface states over $\Delta t/2$ (or estimate source terms using cell center)
     956. Calculate new Fluxes
     967. Update Cells using those fluxes
     978. Calculate source term using time averaged cell center
     989. Update final states using source term for $\Delta t$
     99
     100=== Variant for Self Gravity ===
     101Same first 7 steps
     102
     1038. Use conservative formalism for momentum transport (see https://astrobear.pas.rochester.edu/trac/blog/johannjc10222013) to calculate momentum fluxes associated with self-gravity
     1049. Apply momentum fluxes from s-g to cells
     10510.  Use mass fluxes to calculate energy flux
     10611.  Make it second order by updating fluxes with new potential following elliptic solve.
     107
     108=== Variant for Cylindrical Geometry ===
     109
     110Most geometric source terms can be removed by adjusting the underlying algorithm and fluxes appropriately.  See [http://iopscience.iop.org/article/10.1088/0067-0049/188/1/290/pdf Skinner & Ostriker 2010] - This has yet to be done for AstroBEAR
     111
    74112
    75113
     
    85123Now $A = R \Lambda L$ and we can also add and subtract $\lambda_M I$ so that $\frac{\partial f}{\partial x} = \lambda_M \frac{\partial q}{\partial x} + R (\Lambda - \lambda_M I) L \frac{\partial q}{\partial x}$
    86124
    87 and try to use characteristic tracing with $q(x,t)=q(x-\lambda_M t,0) + q'(x,t)$
     125This expansion motivates the characteristic tracing equation used for PPM.
     126
     127$Q_{L_{i+1/2}} = \frac{1}{\Delta t} \left [\frac{1}{\lambda_M} \displaystyle \int_{x_L-\lambda_M\Delta t}^{x_L} q_k(x',0) dx'  - \sum_{i , \lambda_i > 0} l_{ij} \frac{1}{\lambda_i} \displaystyle \int_{x_L-\lambda_M\Delta t}^{x_L-\lambda_i \Delta t} q_j(x',0) dx'   r_{ik} \right]$
    88128
    89129
    90 
    91 
    92 
    93 
    94 We can use the midpoint rule to estimate
    95 
    96 $Q_{L_{i+1/2}} =  \displaystyle \frac{\int_{0}^{\Delta t} q_L(t) dt}{\Delta t} \approx q_L \left ( \frac{\Delta t}{2} \right ) + O(\Delta t^3)$
    97 
    98 Usually some form of spatial reconstruction is used to calculate $q_L(0)$ and then the evolution equation for q is used to approximate time derivatives using spatial derivatives.
    99 
    100 $q_L(\Delta t/2) = q(x_L,0) + \displaystyle \int_0^{t/2} \frac{\partial q(x_L,t')}{\partial t} $
    101 
    102 which we then use the evolution equation to replace time derivatives with spatial ones
    103 
    104 $q_L(\Delta t/2) = q_L(x_L,0) + \displaystyle \int_0^{t/2} \left [ -\frac{\partial f(x_L,t'))}{\partial x} + s(q(x_L,t')) \right ]$
    105 
    106 and then we can linearize the flux function about $q$
    107 
    108 $\frac{\partial f(q(x,t))}{\partial x} = \frac{\partial f}{\partial q} \frac{\partial q(x,t)}{\partial x} = \lambda \frac{\partial q(x,t)}{\partial x}  $
    109 
    110 
    111 $q_L(\Delta t/2) =  q_L(0) + \displaystyle \int_0^{t/2}  \lambda \frac{\partial (q(x_L,t'))}{\partial x} dt'+ \int_0^{t/2} s(q(x_L,t')) dt' $
    112 
    113 Now if we ignore the source term, we can directly solve for
    114 
    115 $q(x,t)=q(x-\lambda t, 0)$
    116 
    117 and under the change of variables $x'=x_L-\lambda t'$ we can rewrite the integrals as
    118 
    119 $q_L(\Delta t/2) =  q_L(0) + \displaystyle \int_{x_L}^{x_L-\lambda t/2}  \frac{\partial (q(x',0))}{\partial x} dx' + \int_{x_L}^{x_L-\lambda t/2} s(q(x',0)) dx'$
    120 
    121 which just gives us
    122 
    123 $q_L(\Delta t/2) =  q_L(0) - (q(x_L,0) - q(x_L-\lambda \Delta t/2)) + s(\bar{q})\Delta t/2$
    124 
    125 where $\bar{q} = \displaystyle \int_{x_L-\lambda \Delta t/2}^{x_L}q(x',0) dx'$
    126 
    127 
    128 
    129 $\frac{\partial f(q(x,t))}{\partial x} = \frac{\partial f}{\partial q} \frac{\partial q(x,t)}{\partial x} = A \frac{\partial q(x,t)}{\partial x} = R \Lambda L \frac{\partial q(x,t)}{\partial x} = \displaystyle \sum_i R_i \lambda_i L_i \frac{\partial q(x,t)}{\partial x} \approx \displaystyle \sum_i R_i \lambda_i L_i \frac{\partial q(x-\lambda_i t,0)}{\partial x} $
    130 
    131 
    132 and use the characteristics (eigenvectors of the Jacobian of the flux) to linearize the flux
    133 
    134 $q_L(\Delta t/2) =  q_L(0) + \displaystyle \int_0^{t/2} \left [ R \Lambda L \frac{\partial (q(x_L,t'))}{\partial x} + s(q(x_L,t')) \right ] $
    135 
    136 $q_L(\Delta t/2) =  q_L(0) + \displaystyle  \int_0^{t/2} \left [ \sum R_i \lambda_i L_i \frac{\partial (q(x_L,t'))}{\partial x} + s(q(x_L,t')) \right ] $
    137 
    138 $q_L(\Delta t/2) =  q_L(0) + \displaystyle  \int_0^{t/2} \left [ \sum R_i \lambda_i \delta l (L_i \frac{\partial (q(x_L,t'))}{\partial x} + s(q(x_L,t')) \right ] $
    139 
    140 
    141 $q_L(\Delta t/2) =  q_L(0) + \displaystyle  \int_0^{t/2} \left [ \sum R_i \lambda_i \frac{\partial (q(x_L,t'))}{\partial x} + s(q(x_L,t')) \right ] $
    142 
    143 
    144 
    145 and then we can use the solution for the characteristics $q(x_L,t')=q(x_L-\lambda t',0)$ to turn the time integral into a spatial integral
    146 
    147 $q_L(\Delta t/2) =  q_L(0) + A \displaystyle \int_0^{t/2} \left [ \frac{\partial (q(x_L-\lambda t',0))}{\partial x} + s(q(x_L-\lambda t',0)) \right ] $
    148 
    149 which we can do a variable substitution $x' = \lambda t'$