esa / NASA-breakup-model-cpp

A validated modern C++ implementation of the NASA Standard Breakup Model
GNU General Public License v3.0
11 stars 2 forks source link

Conservation of Energy #6

Open gomezzz opened 1 year ago

gomezzz commented 1 year ago

Remembering conversations with colleagues a topic that came up is the conservation of energy in the model.

@schuhmaj @FG-TUM IIRC we conserve mass but not energy right?

So, ideally, in the future it would be nice to scale / cap the velocities of created fragments to conserve energy?

A related question is if there should be a limit to the velocity of created fragments? Currently, I think, sometimes very fast particles are created that can skip out of the simulation domain within one or few time steps.

schuhmaj commented 1 year ago

Exactly, only mass conservation, but no energy or momentum conservation.

Energy conservation should actually be relatively easy to implement. It's just rescaling the velocities after they have been generated but before they are converted to cartesian vectors.

The initial energy can be easily computed in the calculateFragmentCount() and the scaling as the second step in deltaVelocityDistribution().

For the second question, I would suggest making this an option, but not a must, to "cut" the normal distribution on the outer edge if needed.