[Developers] HydroBase update

Erik Schnetter schnetter at cct.lsu.edu
Sun Dec 6 20:48:38 CST 2009

On Dec 6, 2009, at 19:58 , Frank Loeffler wrote:

> Hi,
> On Sun, Dec 06, 2009 at 07:27:16PM -0600, Erik Schnetter wrote:
>> I suggest to add a parameter "initial_hydro" with a default setting of "vacuum".  This parameter, which can be extended by hydro initial data thorns, determines which hydro thorn is setting up initial data.  The default setting "vacuum" is implemented by HydroBase itself, setting all hydro variables to zero.  This corresponds to a vacuum, without atmosphere.
> As long as ADMBase is used together with HydroBase initial data thorns
> can use ADMBase::initial_data for this purpose, and that is what they do
> at the moment.
> While HydroBase itself is independend of ADMBase, hydro initial data
> thorns usually do not only set the hydro variables, but also the
> spacetime variables. They are wired to both, ADMBase and HydroBase. That
> said, this does not have to be like this, it is simply the current
> state. I am not aware of any hydro initial data thorn which can provide
> initial data for the ADM system _and_ another spacetime system.
> Introducing a new parameter in HydroBase would mean the need to set
> an extra parameter in every hydro parameter file. In most cases a
> failure to do this (e.g. using an old parameter file) could be caught
> by the initial data thorn itself (looking at both parameters and refusing
> to work with an incompatible combination).
> In short I agree that it would make HydroBase cleaner. But it
> would also require changes to both: other code and parameter files. Now
> the question is if it is worth the effort. What would we gain from the
> change? If the main reason for this parameter would be to ensure that
> the variables are initialized, this could be done unconditionally by
> HydroBase before the initial data thorns touch them. This would be
> transparent to both other thorns and parameter files.

The main reason for this is to document in the parameter file which variables are going to be initialised.  With the new system there is a contract: if a parameter file sets ADMBase::initial_data, then the ADM variables are going to be initialised.  If HydroBase::initial_hydro is set, then the hydro variables are going to be initialised.  This contract can be checked for each thorn independently, and does not depend on parameter file settings.

While there is not a large problem with just the ADM and hydro variables, things are more complex with Y_e, Bvec on the hydro side, and lapse, shift, and their time derivatives on the GR side.  Accidentally choosing initial data that do or don't set initial conditions e.g. for Bvec or Y_e will be inconvenient to detect.

There should be some kind of mechanism to ensure that all evolved variables are initialised.


Erik Schnetter <schnetter at cct.lsu.edu>   http://www.cct.lsu.edu/~eschnett/

More information about the Developers mailing list