IsotropicRadiationClassicalConvention.java

  1. /* Copyright 2002-2024 CS GROUP
  2.  * Licensed to CS GROUP (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.forces.radiation;

  18. import java.util.ArrayList;
  19. import java.util.Collections;
  20. import java.util.List;

  21. import org.hipparchus.CalculusFieldElement;
  22. import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
  23. import org.hipparchus.geometry.euclidean.threed.Vector3D;
  24. import org.hipparchus.util.FastMath;
  25. import org.orekit.propagation.FieldSpacecraftState;
  26. import org.orekit.propagation.SpacecraftState;
  27. import org.orekit.utils.ParameterDriver;

  28. /** This class represents the features of a simplified spacecraft.
  29.  * <p>This model uses the classical thermo-optical coefficients
  30.  * Ca for absorption, Cs for specular reflection and Cd for diffuse
  31.  * reflection. The equation Ca + Cs + Cd = 1 always holds.
  32.  * </p>
  33.  * <p>
  34.  * A less standard set of coefficients α = Ca for absorption and
  35.  * τ = Cs/(1-Ca) for specular reflection is implemented in the sister
  36.  * class {@link IsotropicRadiationCNES95Convention}.
  37.  * </p>
  38.  *
  39.  * @see org.orekit.forces.BoxAndSolarArraySpacecraft
  40.  * @see org.orekit.forces.drag.IsotropicDrag
  41.  * @see IsotropicRadiationCNES95Convention
  42.  * @author Luc Maisonobe
  43.  * @since 7.1
  44.  */
  45. public class IsotropicRadiationClassicalConvention implements RadiationSensitive {

  46.     /** Parameters scaling factor.
  47.      * <p>
  48.      * We use a power of 2 to avoid numeric noise introduction
  49.      * in the multiplications/divisions sequences.
  50.      * </p>
  51.      */
  52.     private final double SCALE = FastMath.scalb(1.0, -3);

  53.     /** Drivers for absorption and reflection coefficients. */
  54.     private final List<ParameterDriver> parameterDrivers;

  55.     /** Cross section (m²). */
  56.     private final double crossSection;

  57.     /** Simple constructor.
  58.      * @param crossSection Surface (m²)
  59.      * @param ca absorption coefficient Ca between 0.0 an 1.0
  60.      * @param cs specular reflection coefficient Cs between 0.0 an 1.0
  61.      */
  62.     public IsotropicRadiationClassicalConvention(final double crossSection, final double ca, final double cs) {
  63.         this.parameterDrivers = new ArrayList<>(3);
  64.         parameterDrivers.add(new ParameterDriver(RadiationSensitive.GLOBAL_RADIATION_FACTOR, 1.0, SCALE, 0.0, Double.POSITIVE_INFINITY));
  65.         parameterDrivers.add(new ParameterDriver(RadiationSensitive.ABSORPTION_COEFFICIENT, ca, SCALE, 0.0, 1.0));
  66.         parameterDrivers.add(new ParameterDriver(RadiationSensitive.REFLECTION_COEFFICIENT, cs, SCALE, 0.0, 1.0));
  67.         this.crossSection = crossSection;
  68.     }

  69.     /** {@inheritDoc} */
  70.     @Override
  71.     public List<ParameterDriver> getRadiationParametersDrivers() {
  72.         return Collections.unmodifiableList(parameterDrivers);
  73.     }

  74.     /** {@inheritDoc} */
  75.     @Override
  76.     public Vector3D radiationPressureAcceleration(final SpacecraftState state, final Vector3D flux,
  77.                                                   final double[] parameters) {
  78.         final double ca = parameters[1];
  79.         final double cs = parameters[2];
  80.         final double kP = parameters[0] * crossSection * (1 + 4 * (1.0 - ca - cs) / 9.0);
  81.         return new Vector3D(kP / state.getMass(), flux);
  82.     }

  83.     /** {@inheritDoc} */
  84.     @Override
  85.     public <T extends CalculusFieldElement<T>> FieldVector3D<T>
  86.         radiationPressureAcceleration(final FieldSpacecraftState<T> state,
  87.                                       final FieldVector3D<T> flux,
  88.                                       final T[] parameters) {
  89.         final T ca = parameters[1];
  90.         final T cs = parameters[2];
  91.         final T kP = ca.add(cs).negate().add(1).multiply(4.0 / 9.0).add(1).
  92.                      multiply(parameters[0]).multiply(crossSection);
  93.         return new FieldVector3D<>(state.getMass().reciprocal().multiply(kP), flux);
  94.     }
  95. }