## Re: [Libmesh-users] Characteristic-based Split Algorithm

 Re: [Libmesh-users] Characteristic-based Split Algorithm From: Roy Stogner - 2014-07-15 20:52:36 ```On Thu, 10 Jul 2014, Sahai, Amal wrote: > 1) Compute momentum values (U*) at the new time step but without contribution of the pressure terms. (Predictor) > 2) Update Pressure values using U* > 3) Correct new momentum values by taking into account Pressure values. (Corrector) > 4) Update Energy equation. > > I wanted a little advice on how I should structure my solver to > ensure I make use of LibMesh's functionality. I would be solving a > Linear System in all the steps. Do I declare multiple Transient > Linear Systems each corresponding to the different steps in the > algorithm, and solve them one after the other for a given time step? What you typically want is a TransientLinearSystem per set-of-variables. Say, one for (rho_u,rho_v,rho_w), another for (p), another for (rho_E). In this case you'd use the same system for steps 1 and 3, just with a state flag set to tell you to use a different assembly routine (or different terms in the same assembly routine) at the different stages. > Also, since the scheme is conditionally stable, I would need to > evaluate h/(c+|u|) at each node, where h would be the length of the > median from that node to the opposite side (unstructured). How can I > evaluate this? "opposite side" implies you're using triangles or tetrahedra alone? I recall (and Google confirmed) there being a simple formula for a triangle median's length: http://www.algebra.com/algebra/homework/word/geometry/The-length-of-a-median-of-a-triangle.lesson and I'd hope the formula with a tet is just as simple. Either way, you can get the length of a side with e.g. "(node1-node0).size()" --- Roy ```

 [Libmesh-users] Characteristic-based Split Algorithm From: Sahai, Amal - 2014-07-10 16:13:40 ```I am attempting to build a unsteady compressible Navier Stokes solver using Libmesh. I was planning to implement the characteristic-based split algorithm described in Volume 3 of Finite Element Methods (Zienkwicz). The algorithm essentially comprises of the following steps: 1) Compute momentum values (U*) at the new time step but without contribution of the pressure terms. (Predictor) 2) Update Pressure values using U* 3) Correct new momentum values by taking into account Pressure values. (Corrector) 4) Update Energy equation. I wanted a little advice on how I should structure my solver to ensure I make use of LibMesh's functionality. I would be solving a Linear System in all the steps. Do I declare multiple Transient Linear Systems each corresponding to the different steps in the algorithm, and solve them one after the other for a given time step? What would be the best way to implement a predictor-corrector routine with minimum hassle? Also, since the scheme is conditionally stable, I would need to evaluate h/(c+|u|) at each node, where h would be the length of the median from that node to the opposite side (unstructured). How can I evaluate this? Thank you for all your help Regards Amal ```
 Re: [Libmesh-users] Characteristic-based Split Algorithm From: Roy Stogner - 2014-07-15 20:52:36 ```On Thu, 10 Jul 2014, Sahai, Amal wrote: > 1) Compute momentum values (U*) at the new time step but without contribution of the pressure terms. (Predictor) > 2) Update Pressure values using U* > 3) Correct new momentum values by taking into account Pressure values. (Corrector) > 4) Update Energy equation. > > I wanted a little advice on how I should structure my solver to > ensure I make use of LibMesh's functionality. I would be solving a > Linear System in all the steps. Do I declare multiple Transient > Linear Systems each corresponding to the different steps in the > algorithm, and solve them one after the other for a given time step? What you typically want is a TransientLinearSystem per set-of-variables. Say, one for (rho_u,rho_v,rho_w), another for (p), another for (rho_E). In this case you'd use the same system for steps 1 and 3, just with a state flag set to tell you to use a different assembly routine (or different terms in the same assembly routine) at the different stages. > Also, since the scheme is conditionally stable, I would need to > evaluate h/(c+|u|) at each node, where h would be the length of the > median from that node to the opposite side (unstructured). How can I > evaluate this? "opposite side" implies you're using triangles or tetrahedra alone? I recall (and Google confirmed) there being a simple formula for a triangle median's length: http://www.algebra.com/algebra/homework/word/geometry/The-length-of-a-median-of-a-triangle.lesson and I'd hope the formula with a tet is just as simple. Either way, you can get the length of a side with e.g. "(node1-node0).size()" --- Roy ```