-2

I have developed a model in Python to simulate something physical. This model outputs angular velocity over a distance range. For various reasons the model does not give results for small distance values, but it has been suggested to me that I complete the curve using a function which we believe approximates the small distance regime.

My question is, how can I actually implement this? It is not obvious to me how to tie together the curve that results from the model with the known analytic function.

1 Answers1

1

You can make a piecewise function. For example if you know that your angular velocity function is valid for r > 10, then you could do something like

def angular_velocity(r):
    if r > 10:
        your_analytical_function(r)
    else:
        some_alternative_for_small_distance(r)

If your question is more of how to determine an equation for small ranges, then that would really depend on your data and model. There are ways you can extrapolate your data, but in general you should be wary of extrapolation.

Cory Kramer
  • 114,268
  • 16
  • 167
  • 218