Coder Social home page Coder Social logo

richards-swe-coupling's People

Contributors

valentinaschueller avatar

Watchers

 avatar

richards-swe-coupling's Issues

Clean up time step assignment in Groundwater

two places where dt is used at the moment:

  • Groundwater.dt.value in the weak form
  • Groundwater.scheme.model.dt

If one should be changed, both should be changed (use @property for this?). But: is Groundwater.scheme.model.dt actually used anywhere? It seems like an unused value, then we could get rid of it

Support relaxation step

We should introduce a relaxation step in the code, either before sending height data or after receiving it. I don't think preCICE itself supports it so it should be part of river.py/ groundwater.py

Improve time step sizes in code

I am unhappy with the way I am currently setting time step sizes, time windows, and simulation duration. For our analysis it should be possible:

  • to easily switch those settings in the same place (although some of it is related to precice-config.xml and some of it to the solvers
  • to enforce that both solvers use the same time step size
  • to enforce that preCICE doesn't make my solvers use a different time step size than the one I set in the solvers

Properly support subcycling for implicit coupling

At the end of the while loop in both Python scripts, I only call end_time_step() if precice.action_read_iteration_checkpoint() is required. This is in line with the preCICE tutorial. 1
With this simple check, subcycling/multirate doesn't work properly. end_time_step() is called in two different cases:

  • in each iteration for "intermediate" time steps
  • only in the final iteration for the final time step of a time window

Ideally, I would like to save model output only in the final iteration for every time step. Maybe check https://precice.org/couple-your-code-time-step-sizes.html for this?

Originally posted by @valentinaschueller in #14 (comment)

Footnotes

  1. https://precice.org/couple-your-code-implicit-coupling.html

Use xarray DataArray earlier in the code

Instead of storing the numpy arrays for the axis, height, and potential, store the data directly in a DataArray (not just when saving the output in the end). This should also allow us to easily deal with subcycling issues (#15), since the data is clearly linked to a (potentially already existing) time step

Cleaner setup of simulation settings

I want simulations to be set up in a cleaner way to prevent inconsistencies between the Python executables and the preCICE configuration. This is related to #3, #4, #5, #6, #13.

Idea:

  • Use a jinja2 template for the preCICE configuration files (see Benjamin's newer oscillator example implementation)
  • The place where one defines the values for the jinja2 template will be the place where all other simulation settings can be selected
  • Start out with a Python executable for this. Later, think about moving these settings into a YAML file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.