Skip to content

Conversation

@kharold23
Copy link
Contributor

Current situation

Closes #89

Release Notes

  • Added a new parameter fn to flow and pressure boundary conditions that takes in a string
  • Interprets the string as a function of time, represented by the variable t
  • The value of the boundary condition is calculated at each time step by evaluating the function at t = the current time value.

Documentation

Time-dependent boundary conditions can now be input using a function passed in as a string. The function is of the variable t, or time. For example:
"bc_values": { "fn": "2.0 * (4*atan(1.)) * COS(2.0 * (4*atan(1.)) * t)" }

Testing

Test case test_time_dependent_block added to test_io.py, which runs json files timeDep_Flow.json and timeDep_Pressure.json.

Code of Conduct & Contributing Guidelines

Initial implementation of a time-dependent flow BC from an expression string. Currently results in a SEGFAULT.
Finished debugging time-dependent flow block
@ktbolt
Copy link
Contributor

ktbolt commented May 29, 2024

I ran the pulsatileFlow_CStenosis_steadyPressure case on Ubuntu 22 and got the following exception

terminate called after throwing an instance of 'std::runtime_error'
  what():  Maximum number of non-linear iterations reached.

You need to add catching exceptions in the Python testing code.

@ktbolt
Copy link
Contributor

ktbolt commented May 30, 2024

We don't want to mix external software with our source code so the exprtk.hpp file should not be in svZeroDSolver/src/. We need to add a ThirdParty directory and put the exprtk.hpp file in a sub-directory of it.

@ktbolt
Copy link
Contributor

ktbolt commented May 30, 2024

Also I see that there is Docker container file in svZeroDSolver/container/profiling for Ubuntu 22, you can use this to test I think.

@codecov
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 74.69880% with 21 lines in your changes missing coverage. Please review.

Project coverage is 25.12%. Comparing base (688cece) to head (e6760c6).

Files Patch % Lines
src/solve/SimulationParameters.cpp 73.80% 11 Missing ⚠️
src/model/Parameter.cpp 65.51% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #108       +/-   ##
===========================================
- Coverage   79.25%   25.12%   -54.14%     
===========================================
  Files          52       53        +1     
  Lines        2179    15401    +13222     
  Branches      278     1405     +1127     
===========================================
+ Hits         1727     3869     +2142     
- Misses        452    11532    +11080     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@menon-karthik menon-karthik left a comment

Choose a reason for hiding this comment

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

Almost ready! Just some minor comments.

Initial implementation of a time-dependent flow BC from an expression string. Currently results in a SEGFAULT.
Finished debugging time-dependent flow block
@kharold23 kharold23 force-pushed the time-dependent branch 7 times, most recently from 640f3e7 to 563ac27 Compare July 31, 2024 00:15
@mrp089
Copy link
Member

mrp089 commented Feb 6, 2025

@menon-karthik can this be merged?

@mrp089
Copy link
Member

mrp089 commented Mar 20, 2025

@menon-karthik, @ncdorn, do you know if this can be merged? I think @szafronjm would be interested in using that

@menon-karthik
Copy link
Member

@mrp089 This is currently stalled because we could not figure out why one of the tests is failing. But it can be used by directly pulling the feature branch for now: https://github.com/kharold23/svZeroDSolver/tree/time-dependent

@ArashPartow
Copy link

@menon-karthik would mind rebasing/synching this branch to the tip and giving it another go - as the test results seem to have disappeared.

@ncdorn
Copy link
Contributor

ncdorn commented Jun 11, 2025

we should rebase this branch and figure out if it can be merged @kharold23 @menon-karthik

@ncdorn
Copy link
Contributor

ncdorn commented Jul 30, 2025

I will close this as I have taken over this PR on my own fork and have opened the draft pull request #186 to handle these changes.

@ncdorn ncdorn closed this Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow flow and pressure blocks to take time-dependent functions

6 participants