autoemulate.simulations.projectile#
- class Projectile(parameters_range=None, output_names=None, log_level='progress_bar')[source]#
Bases:
Simulator
Simulator of projectile motion.
A projectile is launched from an initial height of 2 meters at an angle of 45 degrees and falls under the influence of gravity and air resistance. Drag is proportional to the square of the velocity. We would like to determine the distance travelled by the projectile as a function of the drag coefficient and the launch velocity.
- class ProjectileMultioutput(parameters_range=None, output_names=None, log_level='progress_bar')[source]#
Bases:
Simulator
Multi-output simulator of projectile motion.
Simulator of projectile motion that outputs both the distance travelled by the projectile and its velocity on impact.
- simulator_base(x)[source]#
Simulate ODE system for projectile motion with drag.
Returns distance projectile travels.
- Parameters:
x (NumpyLike) – Array of input parameters (c, v0).
- Returns:
results – Results of ODE integration.
- Return type:
scipy.integrate.OdeResult
- simulate_projectile(x)[source]#
Return the distance travelled by the projectile.
Distance is obtained by solving the ODE system for projectile motion with drag.
- Parameters:
x (NumpyLike) – Array of input parameters (c, v0).
- Returns:
distance – Distance travelled by projectile.
- Return type: