Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strong constraint 4DVar for 1D Burgers equation #1

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

JHopeCollins
Copy link
Collaborator

@JHopeCollins JHopeCollins commented Aug 15, 2024

Adds a script forward_burgers.py for a simple trapezium rule timestepping for reference.

Adds two scripts for strong constraint 4DVar for the 1D Burgers eq:

  1. sc4dvar.py: Strong constraint 4DVar using a standard ReducedFunctional.
  2. sc4dvar_aaorf.py: Strong constraint 4Dvar using the new AllAtOnceReducedFunctional.

Both scripts start from a target initial condition (two superimposed sin waves of different magnitude/frequency/phase) and run the forward model to generate the "ground truth" observations.

A new initial condition is created (different magnitudes/phase for the sin waves plus some noise). This initial condition (the background) is stepped forward, accumulating the functional for the observation error through the timeseries. This run of the forward model is taped. The second script builds the functional by registering the observations with AllAtOnceReducedFunctional.

The 4DVar system is solved with L-BFGS-B and the optimised initial condition is then stepped forward to collect some errors vs the target solution. The three solutions (target, background, optimised) are written to vtk to compare.

Observations are taken either evenly spaced or randomly in space, but always evenly spaced in time. The functional can include scalar error covariances for the background and observation errors.

@JHopeCollins JHopeCollins self-assigned this Aug 15, 2024
@JHopeCollins JHopeCollins requested a review from dham August 19, 2024 12:59
@JHopeCollins JHopeCollins marked this pull request as ready for review August 20, 2024 10:25
@JHopeCollins
Copy link
Collaborator Author

Tape visualisation from sc4dvar_aaorf.py with three observations (including at initial time) and 3 timesteps between each observation:

dag_sc_aaorf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant