IsotropicRadiationCNES95Convention.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.  *
  30.  * <p>This model uses the coefficients described in the collective
  31.  * book edited by CNES in 1995: Spaceflight Dynamics (part I), in
  32.  * section 5.2.2.1.3.1 (page 296 of the English edition). The absorption
  33.  * coefficient is called α and the specular reflection coefficient is
  34.  * called τ. A comment in section 5.2.2.1.3.2 of the same book reads:
  35.  * <pre>
  36.  * Some authors prefer to express thermo-optical properties for surfaces
  37.  * using the following coefficients: Ka = α, Ks = (1-α)τ, Kd = (1-α)(1-τ)
  38.  * </pre>
  39.  * <p> Ka is the same absorption coefficient, and Ks is also called specular
  40.  * reflection coefficient, which leads to a confusion. In fact, as the Ka,
  41.  * Ks and Kd coefficients are the most frequently used ones (using the
  42.  * names Ca, Cs and Cd), when speaking about reflection coefficients, it
  43.  * is more often Cd that is considered rather than τ.
  44.  *
  45.  * <p>
  46.  * The classical set of coefficients Ca, Cs, and Cd are implemented in the
  47.  * sister class {@link IsotropicRadiationClassicalConvention}, which should
  48.  * probably be preferred to this legacy class.
  49.  * </p>
  50.  *
  51.  * @see org.orekit.forces.BoxAndSolarArraySpacecraft
  52.  * @see org.orekit.forces.drag.IsotropicDrag
  53.  * @see IsotropicRadiationClassicalConvention
  54.  * @author Luc Maisonobe
  55.  * @since 7.1
  56.  */
  57. public class IsotropicRadiationCNES95Convention implements RadiationSensitive {

  58.     /** Parameters scaling factor.
  59.      * <p>
  60.      * We use a power of 2 to avoid numeric noise introduction
  61.      * in the multiplications/divisions sequences.
  62.      * </p>
  63.      */
  64.     private final double SCALE = FastMath.scalb(1.0, -3);

  65.     /** Drivers for absorption and specular reflection coefficients. */
  66.     private final List<ParameterDriver> parameterDrivers;

  67.     /** Cross section (m²). */
  68.     private final double crossSection;

  69.     /** Simple constructor.
  70.      * @param crossSection Surface (m²)
  71.      * @param alpha absorption coefficient α between 0.0 an 1.0
  72.      * @param tau specular reflection coefficient τ between 0.0 an 1.0
  73.      */
  74.     public IsotropicRadiationCNES95Convention(final double crossSection, final double alpha, final double tau) {
  75.         this.parameterDrivers = new ArrayList<>(3);
  76.         parameterDrivers.add(new ParameterDriver(RadiationSensitive.GLOBAL_RADIATION_FACTOR, 1.0, SCALE, 0.0, Double.POSITIVE_INFINITY));
  77.         parameterDrivers.add(new ParameterDriver(RadiationSensitive.ABSORPTION_COEFFICIENT, alpha, SCALE, 0.0, 1.0));
  78.         parameterDrivers.add(new ParameterDriver(RadiationSensitive.REFLECTION_COEFFICIENT, tau, SCALE, 0.0, 1.0));
  79.         this.crossSection = crossSection;
  80.     }

  81.     /** {@inheritDoc} */
  82.     @Override
  83.     public List<ParameterDriver> getRadiationParametersDrivers() {
  84.         return Collections.unmodifiableList(parameterDrivers);
  85.     }

  86.     /** {@inheritDoc} */
  87.     @Override
  88.     public Vector3D radiationPressureAcceleration(final SpacecraftState state, final Vector3D flux,
  89.                                                   final double[] parameters) {
  90.         final double alpha = parameters[1];
  91.         final double tau   = parameters[2];
  92.         final double kP = parameters[0] * crossSection * (1 + 4 * (1.0 - alpha) * (1.0 - tau) / 9.0);
  93.         return new Vector3D(kP / state.getMass(), flux);
  94.     }

  95.     /** {@inheritDoc} */
  96.     @Override
  97.     public <T extends CalculusFieldElement<T>> FieldVector3D<T>
  98.         radiationPressureAcceleration(final FieldSpacecraftState<T> state,
  99.                                       final FieldVector3D<T> flux,
  100.                                       final T[] parameters) {
  101.         final T alpha = parameters[1];
  102.         final T tau   = parameters[2];
  103.         final T kP    = alpha.negate().add(1).multiply(tau.negate().add(1)).multiply(4.0 / 9.0).add(1).
  104.                         multiply(parameters[0]).multiply(crossSection);
  105.         return new FieldVector3D<>(state.getMass().reciprocal().multiply(kP), flux);
  106.     }
  107. }