Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 1, 2024

Conversation

yungyuc
Copy link
Member

@yungyuc yungyuc commented May 1, 2024

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

For the 1D Euler solver, implement the third set of NRBC documented in [NASA/TM-2003-212495-REV1](http://gltrs.grc.nasa.gov/Citations.aspx?id=498), i.e., NRBC type 3.  $\lambda$ is chosen to be 0.
@yungyuc yungyuc added the onedim One-dimensional solver label May 1, 2024
Copy link
Member Author

@yungyuc yungyuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes make NRBC the only BC treatment in the 1D Euler solver. In the future we should implement more.

m_so0(ic, 0) = m_so0(ic + 2, 0);
m_so0(ic, 1) = m_so0(ic + 2, 1);
m_so0(ic, 2) = m_so0(ic + 2, 2);
size_t const ic = 1;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only extend outside the computing domain by a BCE.

@@ -338,8 +338,8 @@ inline void Euler1DCore::march_alpha(size_t steps)
{
march_half1_alpha<ALPHA>();
treat_boundary_so0();
march_half2_alpha<ALPHA>();
treat_boundary_so1();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Treat the NRBC only at the first half time marching.

@yungyuc yungyuc self-assigned this May 1, 2024
@yungyuc yungyuc merged commit 880ea79 into solvcon:master May 1, 2024
13 checks passed
@yungyuc yungyuc deleted the feature/1deuler-nrbc-type3 branch May 1, 2024 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
onedim One-dimensional solver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant