-
Notifications
You must be signed in to change notification settings - Fork 24
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
Arbitrary function & ODE parser #218
Comments
Arbitrary ODE Solver Test CasesThis document provides test cases for a new ODE solver using the Van der Pol oscillator and the Rossler attractor. Each test case includes the problem definition, parameters, initial conditions, and expected behavior. In each case, the only provided inputs are a string value of the ode system, initial conditions, known constant values, and the time span for the initial value problem. No c++ functions have been compiled a priori as these numerical functions (and, if needed, their Jacobians) should be constructed by the arbitrary solver. Explanation
These test cases are designed to assess initial functionality and performance of the new ODE solver on both periodic and chaotic systems. Test Case 1: Van der Pol OscillatorProblem DefinitionThe Van der Pol oscillator is a non-conservative oscillator with non-linear damping. It is described by the following second-order differential equation: This can be converted into a system of first-order ODEs: Parameters
Initial Conditions
Time Span
Expected BehaviorThe Van der Pol oscillator should exhibit a limit cycle behavior for Input Parameters for Solver
Obtained SolutionCombined Results
|
Very nice @zasexton ! Should these tests be added to the svFSIplus Unit Tests? Note that the svZeroDSolver is also using All external software should be placed in |
Reviewing memory efficiency and checking for potential memory leaks using ==27238== HEAP SUMMARY:
==27238== in use at exit: 0 bytes in 0 blocks
==27238== total heap usage: 16,954,566 allocs, 16,954,566 frees, 720,433,544 bytes allocated
==27238==
==27238== All heap blocks were freed -- no leaks are possible
==27238==
==27238== For lists of detected and suppressed errors, rerun with: -s
==27238== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) No leaks detected on test cases. |
@ktbolt these might make good test cases in the future but I'm still not sure how exactly I will pull this solver into the svFSIplus code structure yet... after I double check the obtained solutions I will look to clean up this code to test inclusion within svFSIplus |
The following ODE Solver types have been added:
These solvers will be directly validated against their analogous performant solvers available in |
Observed differences in the solutions seem to be from the Dormand-Prince-Shampine (DPS) triple for the interpolation/extrapolation obtained during the Runge-Kutta 45 scheme. The values obtained for the implementation of the code are given here: https://www.ams.org/journals/mcom/1986-46-173/S0025-5718-1986-0815836-3/S0025-5718-1986-0815836-3.pdf The |
Use Case
Often for perfusion and metabolic modeling, different systems of differential algebraic equations are included as reaction terms to represent kinetic components of overall metabolism. Often hypotheses about metabolic functionality require the form of these equations to be changed substantially (e.g. the inclusion of fatty acid oxidation in a cardiomyocyte model versus glucose oxidation alone). Therefore, users interested in simulating multiple models for tissue perfusion may require a flexible framework to easily change governing reaction equations.
Problem
Currently, any changes to governing equations require recompiling svFSIplus to integrate. Futhermore, the lack of modularity hinders incorporation of complex reaction terms in more complex advection-diffusion-reaction systems.
Solution
We shall introduce flexible string parser to allow for inclusion of arbitrary algebraic and ordinary differential equations into on-demand c++ functions. Such an approach is attractive for general purpose uses and computational efficiency (as opposed to symbolic solvers which may be large third party packages or too slow for integration in a governing PDE equation).
Alternatives considered
Symbolic approaches may be considered if direct construction of c++ functions cannot easily be accomplished (although this is not desirable).
Additional context
Specifically this will be important for perfusion and metabolic modeling although there are many more general use cases.
Code of Conduct
The text was updated successfully, but these errors were encountered: