enrico-dev / enrico

ENRICO: Exascale Nuclear Reactor Investigative COde
https://enrico-docs.readthedocs.io
BSD 3-Clause "New" or "Revised" License
63 stars 26 forks source link

Use correct initial timestep temperature in heat-fluids solver for transients #13

Open paulromano opened 5 years ago

paulromano commented 5 years ago

Moving issue 27 from gitlab originally submitted by @aprilnovak:

The CoupledDriver currently only has a notion of solutions at the current and previous Picard iterations. The heat-fluids solver is usually run as a transient, which performs timestepping based on some solution at the start of the timestep. This initial solution from which the T/H solver marches forward in time should be the same as the CoupledDriver::temperature_ at the start of each timestep if we ever want to run transients (for pseudo-transients where we simulate to a steady state instead of solving PDEs with no time derivatives, the initial condition is irrelevant).

At the start of each timestep in CoupledDriver, we should tell the T/H solver what temperature it should use as the initial condition for that timestep. We can add a temperature_prev_ member to the HeatDriver and NekDriver to represent the temperature at the last timestep.

RonRahaman commented 5 years ago

PR https://github.com/enrico-dev/enrico/pull/35/ will move the temperature update functions into CoupledDriver. I can see that being a good starting point for this issue. Thoughts?

aprilnovak commented 5 years ago

The update_temperature method only updates the temperature known to the coupled driver, i.e. the Picard iteration temperatures. We would need to add some method to Nek's interface like nek_set_temperature(int elem) to tell Nek's solver what temperature to begin marching from.

But given a conversation a while ago that transients aren't a priority, this issue is low on the to-do list since Nek should converge on a single steady temperature solution regardless of whatever IC it has internally.