sxs-collaboration / spectre

SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.
https://spectre-code.org
Other
159 stars 189 forks source link

Use new common time dependent options in Sphere and BCO domains #6115

Open knelli2 opened 3 months ago

knelli2 commented 3 months ago

Proposed changes

Final PR in the series that revamps the time dependent options for the Sphere and BCO domains.

This actually adds all the new common options to the domain creators.

Fixes #5584.

Upgrade instructions

The options for the Rotation and Expansion map have changed. They are now

    TimeDependentMaps:
      ...
      ExpansionMap:
        InitialValues: [1.0, -4.6148457646200002e-05, 0.0] # <-- Must specify all derivs
        InitialValuesOuterBoundary: [1.0, 0.0, 0.0] # <-- Must specify all derivs
        DecayTimescale: Auto # <-- Used for SettleToConst FoT
        DecayTimescaleOuterBoundary: 50.0 # <-- Same as before
        AsymptoticVelocityOuterBoundary: -1.0e-6 # <-- Same as before
      RotationMap:
        InitialQuaternions: [[1.0, 0.0, 0.0, 0.0]] # <-- Need quat. Can optionally specify derivs
        InitialAngles: # <-- Need angle. Can optionally specify derivs (like angular velocity)
          - [0.0, 0.0, 0.0]
          - [0.0, 0.0, 1.5264577062000000e-02] # <-- This is now angular velocity
        DecayTimescale: Auto # <-- used for SettleToConst FoT

For any of the time dependent map options, you can choose the function of time from a volume file by specifying the following options (not just for Expansion, but for Rotation, Translation, and Shape as well)

    TimeDependentMaps:
      ...
      ExpansionMap:
        H5Filename: BbhVolume0.h5
        SubfileName: VolumeData
        Time: 0.0

Code review checklist

Further comments

~Depends on and includes #6109, #6113, and #6114.~