Hi!
I propagate with NRLMSISE00 for reentry purposes, and I have sometimes a problem with the integrator. I have the exception
Caused by: org.hipparchus.exception.MathIllegalArgumentException: minimal step size (1.00E-03) reached, integration needs 9.61E-04
at org.hipparchus.ode.nonstiff.StepsizeHelper.filterStep(StepsizeHelper.java:179)
at org.hipparchus.ode.nonstiff.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:259)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.integrateDynamics(AbstractIntegratedPropagator.java:550)
... 23 more
I have investigated, and it looks like it comes from a discontinuity in the model MSIS00. Indeed if I execute the code below, it shows that the density juste before and after midnight are not exactly the same and differ by 0.1%. With such density, this relative error is enough to force the integrator (I use DormandPrince853Integrator) to reduce its time step lower and lower until the error is raised.
Does someone know if such a discontinuity in MSIS is something that is expected?
Many thanks,
Dorian
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.junit.jupiter.api.Test;
import org.orekit.bodies.BodyShape;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.data.LazyLoadedDataContext;
import org.orekit.models.earth.atmosphere.NRLMSISE00;
import org.orekit.models.earth.atmosphere.NRLMSISE00InputParameters;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.Constants;
import org.orekit.utils.IERSConventions;
public class MSISTest {
@Test
public void testDiscontinuity() {
LazyLoadedDataContext dataContext = new LazyLoadedDataContext();
BodyShape earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING,
dataContext.getFrames().getITRF(IERSConventions.IERS_2010, false));
NRLMSISE00 msis = new NRLMSISE00(newSolarActivity(), dataContext.getCelestialBodies().getSun(), earth, dataContext.getTimeScales().getUT1(IERSConventions.IERS_2010, true));
AbsoluteDate date1 = new AbsoluteDate(2041, 4, 17, 0, 0, 0.0, dataContext.getTimeScales().getUTC());
AbsoluteDate date2 = date1.shiftedBy(-1e-9);
Vector3D position = new Vector3D(5788625.05094290, 1550341.676937541, 2427500.326308472);
System.out.println(msis.getDensity(date1, position, dataContext.getFrames().getEME2000()));
System.out.println(msis.getDensity(date2, position, dataContext.getFrames().getEME2000()));
}
private NRLMSISE00InputParameters newSolarActivity() {
return new NRLMSISE00InputParameters() {
@Override
public double getDailyFlux(AbsoluteDate date) {
return 71.96;
}
@Override
public double getAverageFlux(AbsoluteDate date) {
return 71.95;
}
@Override
public double[] getAp(AbsoluteDate date) {
return new double[]{9.05, 9.05, 9.05, 9.05, 9.05, 9.04833, 9.045};
}
@Override
public AbsoluteDate getMinDate() {
return AbsoluteDate.PAST_INFINITY;
}
@Override
public AbsoluteDate getMaxDate() {
return AbsoluteDate.FUTURE_INFINITY;
}
};
}
}