Skip to content

Get value of time (t) in ode function #55

@Dragomordor

Description

@Dragomordor

Hi, I have a term in my ode that is dependant on the exact time of evaluation. This is because I am look at a reactor with inflow data, but essentially it can be shown using an example like this:

ode(t, y, p, inflowdata):

   time_data = inflowdata[:, 0] # First column is time points for measured data

   # Get Qin at time t
   Qin = np.interp(t, time_data, inflowdata[:, 1] # Second column are Flowrates in at each time point
   
  ....

However, because it is symbolic I cannot just use it like that and I have tried a few solutions with no luck. Can anyone help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions