solvcon / modmesh

Toolkit for solving partial differential equations
BSD 3-Clause "New" or "Revised" License
38 stars 38 forks source link

Implement the third set of NRBC treatment for 1D Euler solver #326

Closed yungyuc closed 5 months ago

yungyuc commented 5 months ago

For the 1D Euler solver, implement the third set of NRBC treatment documented in NASA/TM-2003-212495-REV1, i.e., NRBC type 3. $\lambda$ is chosen to be 0.

Here copying the type-3 NRBC treatment (the third set of NRBC in section 4.3 in page 15 of the TM) at the right and left boundaries, respectively:

u_{A_l} = u_{B_{l-1}} \quad \mathrm{and} \quad (u_x^+)_{A_l} = (1-2\lambda)(u_x^+)_{B_{l-1}}, \, l = 2, 4, 6, \ldots
u_{A'_l} = u_{B'_{l-1}} \quad \mathrm{and} \quad (u_x^+)_{A'_l} = (1-2\lambda)(u_x^+)_{B'_{l-1}}, \, l = 2, 4, 6, \ldots

Choosing $\lambda=0$, the treatment becomes:

u_{A_l} = u_{B_{l-1}} \quad \mathrm{and} \quad (u_x^+)_{A_l} = (u_x^+)_{B_{l-1}}, \, l = 2, 4, 6, \ldots
u_{A'_l} = u_{B'_{l-1}} \quad \mathrm{and} \quad (u_x^+)_{A'_l} = (u_x^+)_{B'_{l-1}}, \, l = 2, 4, 6, \ldots

After implementing the type-3 NRBC treatment, waves go outside the boundary:

image

Comparing with the result with the tentatively implemented (and wrong) BC treatment:

image