]>
tutorial_cv_1
Code verification using the Method of Exact Solutions.
Here, the numerical solution and numerical sensitivities for the Constant coefficient
first order equations are compared to the available analytical solution.
The sensitivity analysis is enabled and the sensitivities are reported to the data reporter.
The sensitivity data can be obtained in two ways:
- Directly from the DAE solver in the user-defined Run function using the
DAESolver.SensitivityMatrix property.
- From the data reporter as any ordinary variable.
The comparison between the numerical and the analytical sensitivities:
.. image:: _static/tutorial_cv_1-results.png
:width: 800px
${\mathit{tutorial}}_{{\mathit{cv}}_{\mathit{1}}}$
y2
$\mathit{y2}$
$${ \left( { \left( { { \partial { { \left( { y2 } \right) } } } \over { \partial { t } } } \right) + { y2 } } \right) + \left( { \left( { {3 {}} \cdot { p1 } } \right) + \left( { {4 {}} \cdot { p2 } } \right) } \right) } = 0$$
$${ \left( { { { \partial { { tutorial_cv_1.y2 } } } \over { \partial { t } } } + { tutorial_cv_1.y2 } } \right) + \left( { \left( { {3 {}} \cdot { tutorial_cv_1.p1 } } \right) + \left( { {4 {}} \cdot { tutorial_cv_1.p2 } } \right) } \right) } = 0$$
False
y1a
$\mathit{y1a}$
$${ { y1a } + \left( { \left( { \left( { {1 {}} \cdot { p1 } } \right) + \left( { {2 {}} \cdot { p2 } } \right) } \right) \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
$${ { tutorial_cv_1.y1a } + \left( { \left( { \left( { {1 {}} \cdot { tutorial_cv_1.p1 } } \right) + \left( { {2 {}} \cdot { tutorial_cv_1.p2 } } \right) } \right) \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
True
y2a
$\mathit{y2a}$
$${ { y2a } + \left( { \left( { \left( { {3 {}} \cdot { p1 } } \right) + \left( { {4 {}} \cdot { p2 } } \right) } \right) \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
$${ { tutorial_cv_1.y2a } + \left( { \left( { \left( { {3 {}} \cdot { tutorial_cv_1.p1 } } \right) + \left( { {4 {}} \cdot { tutorial_cv_1.p2 } } \right) } \right) \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
True
dy1_dp1
${\mathit{dy1}}_{\mathit{dp1}}$
$${ { dy1_dp1 } + \left( { {1 {}} \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
$${ { tutorial_cv_1.dy1_dp1 } + \left( { {1 {}} \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
True
dy1_dp2
${\mathit{dy1}}_{\mathit{dp2}}$
$${ { dy1_dp2 } + \left( { {2 {}} \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
$${ { tutorial_cv_1.dy1_dp2 } + \left( { {2 {}} \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
True
dy2_dp1
${\mathit{dy2}}_{\mathit{dp1}}$
$${ { dy2_dp1 } + \left( { {3 {}} \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
$${ { tutorial_cv_1.dy2_dp1 } + \left( { {3 {}} \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
True
dy2_dp2
${\mathit{dy2}}_{\mathit{dp2}}$
$${ { dy2_dp2 } + \left( { {4 {}} \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
$${ { tutorial_cv_1.dy2_dp2 } + \left( { {4 {}} \cdot \left( { {1 {}} - e^{ { \left( - { {\tau} } \right) } } } \right) } \right) } = 0$$
True