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

We should test time integration in simple test cases #99

Open
1 task done
menon-karthik opened this issue Feb 12, 2024 · 0 comments
Open
1 task done

We should test time integration in simple test cases #99

menon-karthik opened this issue Feb 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@menon-karthik
Copy link
Member

menon-karthik commented Feb 12, 2024

Description

The current tests which have pulsatile boundary conditions only compare the first time step with an expected/analytical solution. We should be testing them against analytical/semi-analytical solution at multiple time steps to make sure the integration is being tested.

Reproduction

Example for RCR BC test case:

def test_pulsatile_flow_r_rcr():
results = run_test_case_by_name("pulsatileFlow_R_RCR")
assert np.isclose(
np.mean(np.array(results["pressure_in"][0])), 4630.973018148328, rtol=RTOL_PRES
) # inlet pressure

Example for coronary BC test case:

def test_pulsatile_flow_r_coronary():
results = run_test_case_by_name("pulsatileFlow_R_coronary")
assert np.isclose(
np.mean(np.array(results["pressure_in"][0])), 880.7264415091931, rtol=RTOL_PRES
) # inlet pressure

In both the tests above, only timestep 0 is compared with the reference solution.

Expected behavior

For simple test cases, such as the RCR and coronary BC blocks, we should compare with semi-analytical solutions. We can write out the governing equations for specific quantities (inlet pressure, for example) and integrate them in time using simple Euler/RK schemes to compute a reference solution to compare against.

Additional context

This is related to #95

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@menon-karthik menon-karthik added the bug Something isn't working label Feb 12, 2024
@menon-karthik menon-karthik added the good first issue Good for newcomers label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants