Effacer les filtres
Effacer les filtres

Error in ODE15s

2 vues (au cours des 30 derniers jours)
Ranjeev Kumar Bhatia
Ranjeev Kumar Bhatia le 20 Mai 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 . :-)

Réponse acceptée

Jan
Jan le 20 Mai 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 commentaire
Ranjeev Kumar Bhatia
Ranjeev Kumar Bhatia le 23 Mai 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)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by