Borrar filtros
Borrar filtros

Error in ODE15s

2 visualizaciones (últimos 30 días)
Ranjeev Kumar Bhatia
Ranjeev Kumar Bhatia el 20 de Mayo de 2021
Comentada: Ranjeev Kumar Bhatia el 23 de Mayo de 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 . :-)

Respuesta aceptada

Jan
Jan el 20 de Mayo de 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 comentario
Ranjeev Kumar Bhatia
Ranjeev Kumar Bhatia el 23 de Mayo de 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)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by