Clear Filters
Clear Filters

Error in ODE15s

2 views (last 30 days)
Ranjeev Kumar Bhatia
Ranjeev Kumar Bhatia on 20 May 2021
I am trying to solve Richards equation for 1D soil column. All the state variables are vectorized. and the functions are defined below the main body of the code. Since the ode is of the form M(t,y)*dy/dt = f(t,y). We can define M(t,y) using the ode options structure i.e. options =odeset('RelTol',1e-6,'AbsTol',1e-6,'Mass',@(t,hw) Richardmass(t,hw,soilPar,modPar), 'MStateDependence','strong').
when I Include the options structure in ode15s solver I get an error saying :-
' Warning: Failure at t=5.661773e+00. Unable to meet integration tolerances without reducing the step size below the
smallest value allowed (1.421085e-14) at time t.
In ode15s (line 655)
In Richards (line 93) '
but without the mass matrix i get a solution but it is not correct
In the code given the variables are t and hw ( time and pressure head) , soilPar and modPar are structures containing the soil properties and model properties repsectively. A staggeredgrid approach was used to deinfe the model parameters
Any hep woul dbe greatky appreciated, Thanks in Advance . :-)

Accepted Answer

Jan
Jan on 20 May 2021
Reduce tspan to tspan = [0, 0.0023] and check the results. It seems, like the values implode such that the integration must fail. I'd assume a typo in the fomula.
  1 Comment
Ranjeev Kumar Bhatia
Ranjeev Kumar Bhatia on 23 May 2021
Thank your for Help. Much Appreciated.
and your correct there was a typo in the formula.
the errpr was this
soilPar.thsat-soilPar.thres(corrected)

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!