This document is a report on a MATLAB simulation of the 3-body problem of Earth, Jupiter, and Neptune orbiting the Sun. It describes developing equations of motion using Newton's law of gravitation and numerically solving the differential equations using the 4th order Runge-Kutta method. Initial conditions for the planets' positions and velocities are provided. M-files are presented that use Runge-Kutta to model the orbits of each planet based on its mass and the gravitational effects of other bodies. The solutions are stored to visualize the results of the simulation over time.
This document describes the process of modeling and simulating a Pratt truss bridge to determine internal forces. The key steps are:
1. Creating a 3D model of the bridge and determining it can be analyzed as a planar structure.
2. Checking the structure is statically determinate and using a matrix approach to analyze the truss. This involves creating a coefficient matrix [A] relating internal forces to applied loads.
3. Calculating applied load vectors for the truss self-weight as permanent loads and variable loads from a moving truck, to obtain the full loading vector [p].
4. Using Gaussian elimination implemented in MATLAB to solve the system of equations relating loads [p] to
This document provides an introduction to two-port networks. It defines the standard configuration of a two-port network with two ports, an input and an output. It then describes various two-port parameter sets - including Z, Y, transmission, and hybrid parameters - and provides examples of calculating the parameters for simple resistive networks. It also demonstrates how the parameters change when elements are added outside the two ports of the original network.
This document summarizes the analysis of a Warren truss using linear algebra and matrix operations. The author sets up an augmented matrix to model the truss, which is then partitioned and put in reduced row echelon form using MATLAB. The solutions reveal which members experience tension and compression, and the magnitude of forces. Member 1 and 6 experience tension, while members 2, 4, and 5 experience compression. Member 3 has zero force. This analysis allows the engineer to design each member appropriately based on expected stress. Linear algebra provides an efficient way to model and analyze structural systems.
Lecture slides on the calculation of the bending stress in case of unsymmetrical bending. The Mohr's circle is used to determine the principal second moments of area.
This document discusses load flow analysis using the Gauss-Seidel iterative method. Load flow studies calculate voltage drops, bus voltages, and power flows under normal and contingency conditions to ensure system voltages and equipment loads remain within limits. They are used to identify need for additional generation or reactive support. The Gauss-Seidel method models the power system buses and solves the nonlinear load flow equations iteratively to determine voltages and power flows throughout the system. It provides an example three bus system to demonstrate forming the bus admittance matrix and performing the first iteration to solve for voltages at two buses.
Here is a new animal with the following attributes:
Name: unknown
Give Birth: no
Can Fly: yes
Live in Water: no
Have Legs: yes
Based on the given attributes, what would be the predicted class of this new animal?
Romberg's method is used to estimate definite integrals by applying Richardson extrapolation repeatedly to the trapezoidal rule or rectangular rule. This generates a triangular array that increases in accuracy. The method is an extension of trapezoidal and rectangular rules. It works by recursively calculating the integral using smaller step sizes to generate values in the triangular array. Convergence is reached when two successive values are very close. An example calculates a definite integral using Romberg's method in three cases with decreasing step sizes to populate the triangular array.
- Shear stress distribution in beams takes a parabolic shape, with the maximum stress at the neutral axis and zero at the ends. In rectangular beams the stress is highest at y=0. In I-beams, most stress is carried by the web in a "top-hat" distribution.
- Circular beams have a shear stress distribution that also follows a parabolic shape, calculated using the area moment of the shaded portion.
- Principal stresses can be determined in beams using the bending and shear stresses. The bending stress is not a principal stress and the principal stresses are found using an equation involving the bending and shear stresses.
This document describes the process of modeling and simulating a Pratt truss bridge to determine internal forces. The key steps are:
1. Creating a 3D model of the bridge and determining it can be analyzed as a planar structure.
2. Checking the structure is statically determinate and using a matrix approach to analyze the truss. This involves creating a coefficient matrix [A] relating internal forces to applied loads.
3. Calculating applied load vectors for the truss self-weight as permanent loads and variable loads from a moving truck, to obtain the full loading vector [p].
4. Using Gaussian elimination implemented in MATLAB to solve the system of equations relating loads [p] to
This document provides an introduction to two-port networks. It defines the standard configuration of a two-port network with two ports, an input and an output. It then describes various two-port parameter sets - including Z, Y, transmission, and hybrid parameters - and provides examples of calculating the parameters for simple resistive networks. It also demonstrates how the parameters change when elements are added outside the two ports of the original network.
This document summarizes the analysis of a Warren truss using linear algebra and matrix operations. The author sets up an augmented matrix to model the truss, which is then partitioned and put in reduced row echelon form using MATLAB. The solutions reveal which members experience tension and compression, and the magnitude of forces. Member 1 and 6 experience tension, while members 2, 4, and 5 experience compression. Member 3 has zero force. This analysis allows the engineer to design each member appropriately based on expected stress. Linear algebra provides an efficient way to model and analyze structural systems.
Lecture slides on the calculation of the bending stress in case of unsymmetrical bending. The Mohr's circle is used to determine the principal second moments of area.
This document discusses load flow analysis using the Gauss-Seidel iterative method. Load flow studies calculate voltage drops, bus voltages, and power flows under normal and contingency conditions to ensure system voltages and equipment loads remain within limits. They are used to identify need for additional generation or reactive support. The Gauss-Seidel method models the power system buses and solves the nonlinear load flow equations iteratively to determine voltages and power flows throughout the system. It provides an example three bus system to demonstrate forming the bus admittance matrix and performing the first iteration to solve for voltages at two buses.
Here is a new animal with the following attributes:
Name: unknown
Give Birth: no
Can Fly: yes
Live in Water: no
Have Legs: yes
Based on the given attributes, what would be the predicted class of this new animal?
Romberg's method is used to estimate definite integrals by applying Richardson extrapolation repeatedly to the trapezoidal rule or rectangular rule. This generates a triangular array that increases in accuracy. The method is an extension of trapezoidal and rectangular rules. It works by recursively calculating the integral using smaller step sizes to generate values in the triangular array. Convergence is reached when two successive values are very close. An example calculates a definite integral using Romberg's method in three cases with decreasing step sizes to populate the triangular array.
- Shear stress distribution in beams takes a parabolic shape, with the maximum stress at the neutral axis and zero at the ends. In rectangular beams the stress is highest at y=0. In I-beams, most stress is carried by the web in a "top-hat" distribution.
- Circular beams have a shear stress distribution that also follows a parabolic shape, calculated using the area moment of the shaded portion.
- Principal stresses can be determined in beams using the bending and shear stresses. The bending stress is not a principal stress and the principal stresses are found using an equation involving the bending and shear stresses.
This document discusses the secant method for finding roots of equations numerically. It provides an overview of the secant method graphically and analytically based on the Newton-Raphson method formula. It then gives an example problem of using the secant method to find a real root of an equation accurate to five significant figures, showing the calculations in a tabular form. The root is calculated to be 3.1004.
Handwritten Digit Recognition and performance of various modelsation[autosaved]SubhradeepMaji
This document presents a comparison of different convolutional neural network (CNN) models for handwritten number recognition that vary by layers. The models are trained on the MNIST dataset. A basic CNN model with convolutional, pooling, and fully connected layers is described. Models with different numbers and placements of layers are tested, and their training accuracy, validation accuracy, and test loss are compared. The optimal model is found to have two dropout layers and achieves 99.64% validation accuracy and the lowest test loss. User input can be tested on the model, and future work may involve improving accuracy for different writing styles.
1.2 deflection of statically indeterminate beams by moment area methodNilesh Baglekar
This document discusses elastic beam theory and how it relates to the bending of beams. It contains the following key points:
1) Elastic beam theory assumes the beam bends into a smooth curve such that cross-sections remain plane and perpendicular to the neutral axis. The radius of curvature is defined as the distance from the center of curvature to the beam.
2) Hooke's law and the flexure formula can be used to relate the radius of curvature to the internal moment and beam properties. Their product is called the flexural rigidity.
3) The moment-area theorems relate the slope and displacement of the beam to the area under the bending moment diagram divided by the flexural rigidity (M/
This document discusses curved beams and how to calculate stresses in them. It notes that the standard flexure formula only applies to straight beams, so a new equation is needed for curved beams. It presents assumptions and equations for determining stresses in curved beams. The key equations show that stresses in curved beams vary hyperbolically based on the radius of curvature and distance from the neutral axis. An example problem demonstrates how to use the equations to find the maximum moment that can be applied before stresses exceed allowable values. It also compares this to what the maximum moment would be if the beam was straight.
The document discusses Cauchy Riemann equations, including its history, important features, definition, and applications. It was discovered in 1851 by Augustin Cauchy and Bernhard Riemann during work on the theory of functions. The equation is used to check the differentiability and analyticity of complex functions. It has applications in engineering fields like triangular grid generation for computational fluid dynamics simulations. It also has applications in verifying Maxwell's equations and calculating fluid intensity and divergence.
Gauss's divergence theorem, the last of the big three theorems in multivariable calculus, links the integral of the divergence of a vector field over a region with the flux integral of the vector field over the boundary surface.
This document provides an introduction to using the finite element method to analyze beam structures. It discusses the basic theory behind discretizing beams into finite elements, including defining the element geometry, determining the shape functions, and assembling the element stiffness matrix. It then provides examples of using the method to calculate deflections and rotations of beams under different loading conditions. Tutorial problems are included to have students apply the concepts by modeling beam problems in Abaqus finite element software.
Self Organizing Maps (SOMs) are a type of neural network that uses unsupervised learning to map high-dimensional input data to a low-dimensional discrete map. SOMs learn the topological relationships in the training data and organize themselves through competition between neurons to become selectively tuned to different input patterns. The algorithm involves initializing weights, finding a winning neuron for each input, and updating the weights of the winning neuron and its neighbors to more closely match the input. Repeated iterations of this process cause the neurons to self-organize the input space onto the map in a topologically ordered fashion.
A lab report on modeling and simulation with python codeAlamgir Hossain
You can find the solution with Objective:
1.Write a program to implement Linear Congruential Generators in python.
2.Write a program to implement Bernouli distribution in python.
3. Write a program to implement Binomal distribution in python.
4. Write a program to implement geometry distribution in python.
5. Write a program to find GCD in python.
6. Write a program to find LCM in python.
This document provides an overview of deep learning concepts including neural networks, regression and classification, convolutional neural networks, and applications of deep learning such as housing price prediction. It discusses techniques for training neural networks including feature extraction, cost functions, gradient descent, and regularization. The document also reviews deep learning frameworks and notable deep learning models like AlexNet that have achieved success in tasks such as image classification.
1) Romberg integration is a numerical method for approximating definite integrals based on Richardson extrapolation of the trapezoidal rule. It provides better approximations than the trapezoidal rule by reducing the true error through recursive calculations.
2) The derivation of Romberg integration involves applying Richardson's extrapolation to the error estimation of the trapezoidal rule. This allows computing a more accurate integral using the results from two less accurate integrals.
3) An example application calculates the volume of water in a tank using Romberg integration, Composite Simpson's rule, and Gaussian quadrature. Romberg integration provided the most accurate result with less computation time compared to the other methods.
In computer graphics, we often need to draw different types of objects onto the screen. Objects are not flat all the time and we need to draw curves many times to draw an object.
This document discusses several network theorems used in circuit analysis including:
- Kirchhoff's laws which deal with conservation of charge and energy. Kirchhoff's current law states the algebraic sum of currents at a node is zero. Kirchhoff's voltage law states the algebraic sum of voltages around a closed loop is zero.
- Mesh and nodal analysis which use Kirchhoff's laws and Ohm's law to set up systems of equations to solve for unknown currents and voltages.
- The superposition theorem which allows breaking a circuit with multiple sources into simpler circuits with one source each in order to determine the total response as the sum of the individual source responses. It applies to linear circuits but not power calculations
Jacobi Method, For Numerical analysis. working matlab code. numeric analysis Jacobi method. MATLAB provides tools to solve math. Using linear programing techniques we can easily solve system of equations. This file provides a running code of Jacobi Method
this is a ppt on centroid,covering centroid of regular figures and there is a example of a composite figure,it has applications,uses of centroid,it is use ful for engineering students,it has 15 slides.
by -nishant kumar.
nk18052001@gmail.com
1. The document discusses concepts in thermodynamics including classical vs statistical thermodynamics, conservation of energy, units of mass and force, properties of systems and processes.
2. It provides examples of applying concepts like Newton's laws to calculate weight on different planets, mass and weight of air in a room, and acceleration of objects.
3. Key points covered are properties of open and closed systems, intensive vs extensive properties, conditions of equilibrium, and types of processes like isothermal and isobaric.
The document discusses methods for determining deflection and slope in beams. It defines terms like deflection, slope, flexural rigidity, and presents the differential equation of the elastic curve. Macaulay's method is described as a way to determine slope and deflection for complex beam loadings by integrating the bending moment expression while applying boundary conditions. Several example problems are given demonstrating the use of Macaulay's method to calculate deflection and slope at specific points for beams with various loading conditions.
Radial basis function networks can be used to solve nonlinear problems like the XOR problem. They work by mapping input data to a higher dimensional space using radial basis functions with center points, making the data linearly separable. The document discusses using Gaussian radial basis functions with 1, 2 and 4 center points to solve the XOR problem. It shows the calculations of the radial basis functions for different input vectors and how the network with weights can be trained to learn the XOR function.
Computational Physics - modelling the two-dimensional gravitational problem b...slemarc
The document describes a C++ program that models the two-dimensional gravitational interaction between two point masses. The program uses Newton's laws of motion and gravitation to calculate the forces, accelerations, velocities, and positions of the two masses at each time step. It assumes the masses follow elliptical orbits and uses the orbital period and energy to determine the time step for its calculations. The program outputs the positions of the masses over time to a file that can be used to plot their orbital paths.
Lab 05 – Gravitation and Keplers Laws Name __________________.docxDIPESH30
This document is a lab assignment on gravitation and Kepler's laws. It includes an introduction to universal gravitation and Newton's law of gravitation. The document contains a procedure where students are asked to use an online simulation to observe gravitational force between two objects at different distances and masses. They then calculate the gravitational constant, G, and compare it to published values. Several conclusion questions follow about gravitational forces and Kepler's laws of planetary motion.
This document discusses the secant method for finding roots of equations numerically. It provides an overview of the secant method graphically and analytically based on the Newton-Raphson method formula. It then gives an example problem of using the secant method to find a real root of an equation accurate to five significant figures, showing the calculations in a tabular form. The root is calculated to be 3.1004.
Handwritten Digit Recognition and performance of various modelsation[autosaved]SubhradeepMaji
This document presents a comparison of different convolutional neural network (CNN) models for handwritten number recognition that vary by layers. The models are trained on the MNIST dataset. A basic CNN model with convolutional, pooling, and fully connected layers is described. Models with different numbers and placements of layers are tested, and their training accuracy, validation accuracy, and test loss are compared. The optimal model is found to have two dropout layers and achieves 99.64% validation accuracy and the lowest test loss. User input can be tested on the model, and future work may involve improving accuracy for different writing styles.
1.2 deflection of statically indeterminate beams by moment area methodNilesh Baglekar
This document discusses elastic beam theory and how it relates to the bending of beams. It contains the following key points:
1) Elastic beam theory assumes the beam bends into a smooth curve such that cross-sections remain plane and perpendicular to the neutral axis. The radius of curvature is defined as the distance from the center of curvature to the beam.
2) Hooke's law and the flexure formula can be used to relate the radius of curvature to the internal moment and beam properties. Their product is called the flexural rigidity.
3) The moment-area theorems relate the slope and displacement of the beam to the area under the bending moment diagram divided by the flexural rigidity (M/
This document discusses curved beams and how to calculate stresses in them. It notes that the standard flexure formula only applies to straight beams, so a new equation is needed for curved beams. It presents assumptions and equations for determining stresses in curved beams. The key equations show that stresses in curved beams vary hyperbolically based on the radius of curvature and distance from the neutral axis. An example problem demonstrates how to use the equations to find the maximum moment that can be applied before stresses exceed allowable values. It also compares this to what the maximum moment would be if the beam was straight.
The document discusses Cauchy Riemann equations, including its history, important features, definition, and applications. It was discovered in 1851 by Augustin Cauchy and Bernhard Riemann during work on the theory of functions. The equation is used to check the differentiability and analyticity of complex functions. It has applications in engineering fields like triangular grid generation for computational fluid dynamics simulations. It also has applications in verifying Maxwell's equations and calculating fluid intensity and divergence.
Gauss's divergence theorem, the last of the big three theorems in multivariable calculus, links the integral of the divergence of a vector field over a region with the flux integral of the vector field over the boundary surface.
This document provides an introduction to using the finite element method to analyze beam structures. It discusses the basic theory behind discretizing beams into finite elements, including defining the element geometry, determining the shape functions, and assembling the element stiffness matrix. It then provides examples of using the method to calculate deflections and rotations of beams under different loading conditions. Tutorial problems are included to have students apply the concepts by modeling beam problems in Abaqus finite element software.
Self Organizing Maps (SOMs) are a type of neural network that uses unsupervised learning to map high-dimensional input data to a low-dimensional discrete map. SOMs learn the topological relationships in the training data and organize themselves through competition between neurons to become selectively tuned to different input patterns. The algorithm involves initializing weights, finding a winning neuron for each input, and updating the weights of the winning neuron and its neighbors to more closely match the input. Repeated iterations of this process cause the neurons to self-organize the input space onto the map in a topologically ordered fashion.
A lab report on modeling and simulation with python codeAlamgir Hossain
You can find the solution with Objective:
1.Write a program to implement Linear Congruential Generators in python.
2.Write a program to implement Bernouli distribution in python.
3. Write a program to implement Binomal distribution in python.
4. Write a program to implement geometry distribution in python.
5. Write a program to find GCD in python.
6. Write a program to find LCM in python.
This document provides an overview of deep learning concepts including neural networks, regression and classification, convolutional neural networks, and applications of deep learning such as housing price prediction. It discusses techniques for training neural networks including feature extraction, cost functions, gradient descent, and regularization. The document also reviews deep learning frameworks and notable deep learning models like AlexNet that have achieved success in tasks such as image classification.
1) Romberg integration is a numerical method for approximating definite integrals based on Richardson extrapolation of the trapezoidal rule. It provides better approximations than the trapezoidal rule by reducing the true error through recursive calculations.
2) The derivation of Romberg integration involves applying Richardson's extrapolation to the error estimation of the trapezoidal rule. This allows computing a more accurate integral using the results from two less accurate integrals.
3) An example application calculates the volume of water in a tank using Romberg integration, Composite Simpson's rule, and Gaussian quadrature. Romberg integration provided the most accurate result with less computation time compared to the other methods.
In computer graphics, we often need to draw different types of objects onto the screen. Objects are not flat all the time and we need to draw curves many times to draw an object.
This document discusses several network theorems used in circuit analysis including:
- Kirchhoff's laws which deal with conservation of charge and energy. Kirchhoff's current law states the algebraic sum of currents at a node is zero. Kirchhoff's voltage law states the algebraic sum of voltages around a closed loop is zero.
- Mesh and nodal analysis which use Kirchhoff's laws and Ohm's law to set up systems of equations to solve for unknown currents and voltages.
- The superposition theorem which allows breaking a circuit with multiple sources into simpler circuits with one source each in order to determine the total response as the sum of the individual source responses. It applies to linear circuits but not power calculations
Jacobi Method, For Numerical analysis. working matlab code. numeric analysis Jacobi method. MATLAB provides tools to solve math. Using linear programing techniques we can easily solve system of equations. This file provides a running code of Jacobi Method
this is a ppt on centroid,covering centroid of regular figures and there is a example of a composite figure,it has applications,uses of centroid,it is use ful for engineering students,it has 15 slides.
by -nishant kumar.
nk18052001@gmail.com
1. The document discusses concepts in thermodynamics including classical vs statistical thermodynamics, conservation of energy, units of mass and force, properties of systems and processes.
2. It provides examples of applying concepts like Newton's laws to calculate weight on different planets, mass and weight of air in a room, and acceleration of objects.
3. Key points covered are properties of open and closed systems, intensive vs extensive properties, conditions of equilibrium, and types of processes like isothermal and isobaric.
The document discusses methods for determining deflection and slope in beams. It defines terms like deflection, slope, flexural rigidity, and presents the differential equation of the elastic curve. Macaulay's method is described as a way to determine slope and deflection for complex beam loadings by integrating the bending moment expression while applying boundary conditions. Several example problems are given demonstrating the use of Macaulay's method to calculate deflection and slope at specific points for beams with various loading conditions.
Radial basis function networks can be used to solve nonlinear problems like the XOR problem. They work by mapping input data to a higher dimensional space using radial basis functions with center points, making the data linearly separable. The document discusses using Gaussian radial basis functions with 1, 2 and 4 center points to solve the XOR problem. It shows the calculations of the radial basis functions for different input vectors and how the network with weights can be trained to learn the XOR function.
Computational Physics - modelling the two-dimensional gravitational problem b...slemarc
The document describes a C++ program that models the two-dimensional gravitational interaction between two point masses. The program uses Newton's laws of motion and gravitation to calculate the forces, accelerations, velocities, and positions of the two masses at each time step. It assumes the masses follow elliptical orbits and uses the orbital period and energy to determine the time step for its calculations. The program outputs the positions of the masses over time to a file that can be used to plot their orbital paths.
Lab 05 – Gravitation and Keplers Laws Name __________________.docxDIPESH30
This document is a lab assignment on gravitation and Kepler's laws. It includes an introduction to universal gravitation and Newton's law of gravitation. The document contains a procedure where students are asked to use an online simulation to observe gravitational force between two objects at different distances and masses. They then calculate the gravitational constant, G, and compare it to published values. Several conclusion questions follow about gravitational forces and Kepler's laws of planetary motion.
This document summarizes an N-body simulation of celestial mechanics. Newton's second law was used to model the gravitational force between point masses. The equations of motion were integrated using a leap frog method to simulate the motion of bodies in the solar system over 25.5 years. While the total energy and angular momentum were conserved to a high degree, some error accumulated in the calculated positions of planets compared to ephemeris data, due to approximations in the model. Additional simulations demonstrated orbits in binary star and three-body systems.
This document summarizes Colin D'Elia's senior project applying Suzuki's fourth-order symplectic integration scheme to numerically integrate a simplified solar system model over 165 million years. Key findings include:
1) The estimated Lyapunov time for test particle Plutos of greater than 6.3 million years agrees with previous research estimating the Lyapunov time between 6.5-20 million years.
2) In contrast to previous non-symplectic integrations that showed linear energy growth, this symplectic integration exhibited periodic energy fluctuations with the energy virtually unchanged after 200 million years.
3) Recovering the initial conditions after forward and backward integration for 165 million years found the positions
Astronomy Projects For Calculus And Differential EquationsKatie Robinson
This document provides astronomy projects for calculus and differential equations courses that use real-world astronomical phenomena to teach mathematical concepts. It includes introductions to Kepler's laws of planetary motion and approximations of eccentric anomaly using Bessel functions. Projects are provided for calculus I-III and differential equations courses on topics like the orbits of Mars, Mercury, Halley's Comet, the Mars rover Curiosity, and a star orbiting Sagittarius A*. Instructions are given for instructors to assign the projects along with sample student reports.
Planetary Motion- The simple Physics Behind the heavenly bodiesNISER-sac
The document summarizes Kepler's laws of planetary motion and Newton's law of universal gravitation. It explains how Newton was able to derive Kepler's laws from his law of gravitation. It then discusses the central force problem and how to solve it to obtain planetary orbits. Finally, it briefly touches on limitations of the two-body approximation and possibilities like Lagrange points when more than two bodies are involved.
11 - 3
Experiment 11
Simple Harmonic Motion
Questions
How are swinging pendulums and masses on springs related? Why are these types of
problems so important in Physics? What is a spring’s force constant and how can you measure
it? What is linear regression? How do you use graphs to ascertain physical meaning from
equations? Again, how do you compare two numbers, which have errors?
Note: This week all students must write a very brief lab report during the lab period. It is
due at the end of the period. The explanation of the equations used, the introduction and the
conclusion are not necessary this week. The discussion section can be as little as three sentences
commenting on whether the two measurements of the spring constant are equivalent given the
propagated errors. This mini-lab report will be graded out of 50 points
Concept
When an object (of mass m) is suspended from the end of a spring, the spring will stretch
a distance x and the mass will come to equilibrium when the tension F in the spring balances the
weight of the body, when F = - kx = mg. This is known as Hooke's Law. k is the force constant
of the spring, and its units are Newtons / meter. This is the basis for Part 1.
In Part 2 the object hanging from the spring is allowed to oscillate after being displaced
down from its equilibrium position a distance -x. In this situation, Newton's Second Law gives
for the acceleration of the mass:
Fnet = m a or
The force of gravity can be omitted from this analysis because it only serves to move the
equilibrium position and doesn’t affect the oscillations. Acceleration is the second time-
derivative of x, so this last equation is a differential equation.
To solve: we make an educated guess:
Here A and w are constants yet to be determined. At t = 0 this solution gives x(t=0) = A,
which indicates that A is the initial distance the spring stretches before it oscillates. If friction is
negligible, the mass will continue to oscillate with amplitude A. Now, does this guess actually
solve the (differential) equation? A second time-derivative gives:
Comparing this equation to the original differential equation, the correct solution was
chosen if w2 = k / m. To understand w, consider the first derivative of the solution:
−kx = ma
a = −
k
m
⎛
⎝
⎜⎜⎜⎜
⎞
⎠
⎟⎟⎟⎟
x
d 2x
dt 2
= −
k
m
x x(t) = A cos(ωt)
d 2x(t)
dt 2
= −Aω2 cos(ωt) = −ω2x(t)
James Gering
Florida Institute of Technology
11 - 4
Integrating gives
We assume the object completes one oscillation in a certain period of time, T. This helps
set the limits of integration. Initially, we pull the object a distance A from equilibrium and
release it. So at t = 0 and x = A. (one.
Existence and Stability of the Equilibrium Points in the Photogravitational M...ijceronline
In this article we have discussed the equilibrium points in the photogravitational magnetic binaries problem when the bigger primary is a oblate spheroid and source of radiation and the small primary is a oblate body and have investigated the stability of motion around these points.
Solar system expansion and strong equivalence principle as seen by the NASA M...Sérgio Sacani
The NASA MESSENGER mission explored the innermost planet of the solar system and obtained a rich data set of range measurements for the determination of Mercury’s ephemeris. Here we use these precise data collected over 7 years to estimate parameters related to general relativity and the evolution of the Sun. These results confirm the validity of the strong equivalence principle with a significantly refined uncertainty of the Nordtvedt parameter η=(−6.6±7.2)×10−5. By assuming a metric theory of gravitation, we retrieved the post-Newtonian parameter β=1+(−1.6±1.8)×10−5 and the Sun’s gravitational oblateness, J2 =(2.246±0.022)×10−7. Finally, we obtain an estimate of the time variation of the Sun gravitational parameter, _ GM=GM =(−6.13±1.47)×10−14, which is consistent with the expected solar mass loss due to the solar wind and interior processes. This measurement allows us to constrain _
The purpose of this lab is to explore basic properties of the Jovian.docxhelen23456789
The purpose of this lab is to explore basic properties of the Jovian planets and to examine geologic processes on some of the larger moons of the outer solar system.
Part 1: A Comparison of Planetary Sizes
Background
As we saw last week, a basic property of planets is their size. To compare sizes, we can compare the diameter (distance from one side to the other) of one planet to another, or we can compare the radius (half the diameter) of one planet to another.
Graphing All the Major Planets
Table 1. The average diameters* of the planets in our solar system in kilometers (km)
MercuryVenusEarthMarsJupiterSaturnUranusNeptune487912,10412,7426779139,822116,46450,72449,244
*Data source:
AstronomyNotes.com
Size comparison is better shown graphically than with numbers. You have already done this for the terrestrial planets in last week's lab.
The image above shows an example of what you will be doing. Remember scientific notation. The numbers on the axes are 0; 20,000; 40,000; and 60,000; and refer to kilometers. In order to plot a circle representing a planet with a 70,000 km diameter, I first took the radius (35,000 which is half the diameter), moved along the x-axis to 35,000, and drew a line up from zero that was 70,000 units long. Then I repeated this for the y-axis and sketched in the circle around the “+” that I’d drawn. Detail about drawing the circles were shown in the video last week.
Table 1 gives the average diameters for the planets in our solar system in kilometers. Use this data to plot circles representing the different planets to their correct sizes on the graph paper provided (
.png version
;
.docx version
; and
.pdf version
). Use a different color for each circle. Clearly identify which circle corresponds to which planet (labels or keys to colors). When you have finished, upload your completed graph to the correct assignment box.
Figure 1. Example of graph paper used for plotting planet sizes. Links to downloadable
.png
,
.docx
, and
.pdf
versions.
UPLOAD TO
ASSIGNMENT BOX
FOR LAB 5 - Solar-System-Planet-Sizes
Upload your diagram to the Assignment Box—name your files: [Yourlastname]_Solar_System_Planet_Sizes
In addition to looking at a graphical representation, we sometimes compare objects by saying how many times larger or smaller one is relative to the other. For example: If one student is 5.5 feet tall, and another is 6 feet tall, then we can say that the taller student is 1.1 times taller than the shorter student or that the shorter student is 0.92 times shorter than the taller student. This is done by simply dividing one number into another.
Lab 5: Question 1
Jupiter and Saturn are similar in size, but Jupiter is the largest planet in the solar system. Jupiter is _________ times larger than Saturn. Enter a number only. Use two significant figure [example, 2.2 or 22]
Lab 5: Question 2
SHORT ESSAY: Spend a bit of time looking at the graph you've created. Describe the variation that y.
This document contains a powerpoint presentation on using Newton's laws of motion and universal gravitation to derive formulas for orbital velocity, escape velocity, and calculating planetary masses. It includes examples of using these formulas to calculate the mass of Earth from the moon's orbit and estimating escape velocity of Earth. The presentation is intended for pre-AP Algebra 1 or Algebra 2 students to practice manipulating equations and unit conversions. It recommends the Space Math website as a source for additional astronomy math problems.
Here are the key steps to calculate the mass of Earth (M) from the given data:
1) Acceleration due to gravity on Earth's surface (g) = 9.81 m/s^2
2) Universal gravitational constant (G) = 6.67x10^-11 Nm^2/kg^2
3) Radius of Earth (R) = 6.37x10^6 m
4) Using the formula for acceleration due to gravity:
g = GM/R^2
5) Rearranging the terms:
M = gR^2/G
6) Substituting the values:
M = (9.81 m/s^2)(
Here are the key steps to calculate the mass of Earth (M) from the given data:
1) Acceleration due to gravity on Earth's surface (g) = 9.81 m/s^2
2) Universal gravitational constant (G) = 6.67x10^-11 Nm^2/kg^2
3) Radius of Earth (R) = 6.37x10^6 m
4) Using the formula for acceleration due to gravity:
g = GM/R^2
5) Rearranging the terms:
M = gR^2/G
6) Substituting the values:
M = (9.81 m/s^2)(
The Equation Based on the Rotational and Orbital Motion of the PlanetsIJERA Editor
Equations of dependence of rotational and orbital motions of planets are given, their rotation angles are calculated. Wave principles of direct and reverse rotation of planets are established. The established dependencies are demonstrated at different scale levels of structural interactions, in biosystems as well. The accuracy of calculations corresponds to the accuracy of experimental data
This document discusses mechanics concepts including Newton's second law of motion and equations of motion. It defines Newton's second law as relating the forces acting on a particle to the particle's acceleration and mass. It states that the acceleration is proportional to the net force and in the direction of the net force. It also discusses using free-body diagrams and kinetic diagrams to represent forces on a particle and write the equations of motion in component form.
This document contains a presentation on Newton's second law of motion. The presentation topics include the relation between force, mass and acceleration, applications of Newton's second law, equations of motion, and an introduction to kinetics of particles. The document provides definitions and explanations of key concepts such as force, mass, acceleration, momentum, impulse, and kinetics. It also includes sample problems demonstrating applications of Newton's second law and equations of motion, along with step-by-step solutions. The presentation was made by Danyal Haider and Kamran Shah and covers fundamental principles of classical mechanics.
The document describes a program developed to model the trajectory of a satellite leaving low Earth orbit and exiting Earth's sphere of influence. The program allows the user to input the initial orbit height and thruster angle and outputs the trajectory plot and time taken. Testing various initial conditions revealed that a thrust directed along the satellite's velocity vector provided the fastest exit time from Earth's sphere of influence.
There are relativistic effects in the solar group (proves)Gerges francis
The Main Hypothesis
"There Are Relativistic Effects In The Solar Group"
We can't observe the higher velocity which produces these relativistic effects but we can observe the relativistic effects which are produced by it.
As proves for the relativistic effects, I may refer to the following:
1. The Earth Moon Motion …
2. Mercury Day Period…
The previous 2 phenomena should be discussed in this paper with many other as proves for the relativistic effects are found in the solar group geometry.
This Papers provides 2 Points
1st Point : The Relativistic Effects Proves
2nd Point : The Relativistic effects Geometrical Meaning and Description.
This student conducted an experiment to estimate the mass of Jupiter by measuring the orbital characteristics of its four Galilean moons over several nights of observation. Photographs were taken of Jupiter and the moons and their orbital radii and periods were calculated from the pixel measurements. These values were used in an equation relating the orbital motion to Jupiter's mass. The estimated masses were all lower than the known value, suggesting a systemic error in the pixel measurements, likely due to difficulties focusing the telescope.
This document introduces dynamics and kinematics concepts. It defines key terms like position, velocity, acceleration, and describes different types of motion. Rectilinear motion is explained, where acceleration can be a function of time, distance, or velocity. Equations of motion are provided to calculate changes in motion based on these variable-dependent accelerations. The goal is to determine the relationships between position, velocity, acceleration, and time that characterize different particle motions.
1. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
1
Modelling and Simulation
MATLAB Simulation
2014
Minjie Lu (11450458)
School of Civil Structural and Environmental Engineering
2. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
2
In this report, the code used in Matlab practice is shown in the black text boxes.
Problem: 3-body planet problem
This problem asked us to set up the equations of motion for the planet earth taking into account the
gravitational effects of the sun and of the planets Jupiter and Neptune. Produce a simulation for the motion
of the three planets for a period of at least three Jovian years. Visualise by creating an animation, i.e. a
movie file or .avi file.
As this is a group project, we decide to divide the work to each team members as follow:
Ryan McLaughlin: Focuses on development of and presentation of the analysis. His responsibility is
looking up of certain standard data such as the relevant planetary masses.
Minjie Lu(Myself): Focuses on numerical solution of the resulting differential equations by some method
presented in the module. We used Fourth Order Runge Kutta Method as the numerical method in this project.
Luke O'Doherty: Focuses on the presentation of results, i.e. the animation.
Development of function equations & Research of relevant information:
Newton’s Universal Law of Gravitation states ‘that every point mass in the universe attract every other point
mass with a force that is directly proportional to the product of their masses and inversely proportional to the
square of the distance between them’.
𝐹 = 𝐺
𝑚1 𝑚2
𝑟2
Equation 1.1 Newton’s law of Gravitation
F is the force between the masses,
G is the gravitational constant
m1 is the first mass,
m2 is the second mass, and
r is the distance between the centres of the masses
In order to determine the movements of the 3 planets orbiting the Sun, equation 1.1 can be rearranged in
order to express each planets motion orbiting the Sun.
We know from Newton’s second law of Motion that acceleration is produced when a force acts on a mass
object.
𝐹 = 𝑚𝑎
Equation 1.2 Newton’s second Law of Motion
3. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
3
Solving Equation 1.2 in terms of 𝑎 and then subbing Equation 1.1 in for 𝐹 allows us to express acceleration
as
𝑎 = 𝐺
𝑚
𝑟2
Equation 1.3 Acceleration of planets
To plot the movements of the planets, the motion will have to be represented in vector form. Equation 1.3
must be developed into vector form for the movement of each planet in the x and y direction.
𝑎̅ =
𝐺 𝑚1
|𝑅12|
𝑅12
̂
Where |𝑅12| = |𝑅2 − 𝑅1| is the distance between the two planets
𝑅12
̂ =
𝑅2−𝑅1
|𝑅2−𝑅1|
is the unit vector from one planet to another
𝑎̅ =
𝐺𝑚(𝑅2 − 𝑅1)
|𝑅2 − 𝑅1|3
Equation 1.4 Acceleration in vector form
This is the equation that will be used for the numerical analysis of this 3-body problem.
The next step is to find the initial conditions for each planet allowing the above differential equations to be
used.
The Mean Radius and Mass of both the Sun and Planets are found on the NASA website [1]
.
Using Jet propulsion laboratory [2]
allows the user to select a target body and observer its location in a vector
table. This showed both the position and velocity of the target on a certain day.
The figures in Table 1.1 are from the 17 𝑡ℎ
of May 2014.
Sun Earth Jupiter Neptune
Mean Radius (AU) 4.654478× 10−3
4.26352× 10−5
4.778913× 10−4
1.6555× 10−4
Mass (kg) 1.98854× 1030
5.97219× 1024
1.89813× 1027
1.0241× 1026
Position ( x-direction) (AU) 0 -5.66141252× 10−1
-2.3021578957 2.72424616× 101
Position ( y-direction) (AU) 0 -8.38492422× 10−1 4.70662422303 -1.2504889× 101
Velocity ( x-direction) (AU) 0 1.395322746× 10−2
-6.86942442× 10−3
1.2883944× 10−3
Velocity ( y-direction) (AU) 0 -9.72277019× 10−3
-2.9587172× 10−3
1.731366× 10−3
Table 1.1 Initial conditions for the 3-body problem
4. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
4
The numerical solution:
It is clear that Fourth Order Runge Kutta Method is a very powerful method to solve ordinary differential
equations. Therefore, Our team decided to use this method to slove the ODE functions involved in this
problem. For this three body problem, we are assuming that the earth, Jupiter and Neptune orbit a on one
plane as the sun, i.e the z co-ordinates remain constant. The Fourth Order Runge Kutta Method was made
from the following equations:
𝑦 𝑛+1 = 𝑦𝑛 + (𝑤1 𝑘1 + 𝑤2 𝑘2 + 𝑤3 𝑘3 + 𝑤4 𝑘4)
𝑥 𝑛+1 = 𝑥 𝑛 + ℎ
𝑘1 = ℎ𝑓(𝑥 𝑛, 𝑦𝑛)
𝑘2 = ℎ𝑓(𝑥 𝑛 + 𝛼1ℎ, 𝑦𝑛 + 𝛽1 𝑘1)
𝑘3 = ℎ𝑓(𝑥 𝑛 + 𝛼2ℎ, 𝑦𝑛 + 𝛽2 𝑘2)
𝑘4 = ℎ𝑓(𝑥 𝑛 + 𝛼3ℎ, 𝑦𝑛 + 𝛽3 𝑘3)
Where 𝑤1 =
1
6
, 𝑤2 =
2
6
, 𝑤3 =
2
6
, 𝑤4 =
1
6
, 𝛼1 =
1
2
, 𝛼2 =
1
2
, 𝛼3 = 1, 𝛽1 =
1
2
, 𝛽2 =
1
2
, 𝛽3 = 1
The fourth Order Runge Kutta Method above is used for solving the ODE functions for Jupiter, Neptune and
Earth. The equation for Jupiter involves the gravitational force between the planet Jupiter and Sun.
The equation for solving the planet Neptune is slightly different to the above, as we have to take account
gravitational effects of both the Sun and Jupiter. The eqution for solving Earth is even more complicated,
since we have to take account the gravitational effects of Jupiter, Neptune and the Sun. In order to solve the
distance between the planets, the norm command is used. This command can help us to get the distance
between the planets by using pythagoras theorm. The basic idea of the norm command (Fig.MP2-1):
Figure MP2-1
As AB represent Distance in y-direction
and BC represent distance in x-direction,
the norm command is used to find the
distance between AC (i.e. the radius)
5. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
5
Another team member, Ryan has already gathered the information about the initial conditions of Jupiter,
Neptune, Earth and Sun (includes their Radius, Mass, Position and Velocity in both x and y direction, the
Distance between the planets). Three of our team members will be consistent collaborated throughout the
duration of this project, as I need those basic informations to solve the ODE equation. And Luke needs the
M-files I will be creating to animate the results.
Before developing the numerical solution, the following assumptions will be made:
1. The centre of the mass (The Sun) will remain as a fixed point and will be placed at the origin of the
co-ordinate system.
2. All masses are considered as point mass.
3. As the angle of inclination from the centre mass is negilible, the z co-ordinates will be neglected.
M-file to solve ordinary differential equation for Jupiter:
This function is used to solve ODE of Newton's law of universal gravitation by using Fourth Order Runge-
Kutta method in order to find the acceleration of Jupiter. It does so by taking four inputs which includes:
Ms(Mass of Sun),H(The stepsize),N(The final time), and the initial conditions of Jupiter,namely Jupiters'
position and velocity in the x and y direction. The function is used to solve their derivatives, velocity and
acceleration. And once these parameters have been solved, they will be updated to the initial condition
vector.The solutions for each step size are stored in order to visualise the results.
Function [Storage]=planet_Jupiter(Ms,H,N,Jupiter_initial_condition)
%Function operates to solve ODE of Newton's law of universal gravitation by
%using Fourth Order Runge-Kutta method in order to find the acceleration of Jupiter.
%This function requires four inputs
%which includes: Ms(Mass of Sun),H(The stepsize),N(The final time), and the
%initial conditions of Jupiter,namely Jupiters' position and velocity in
%the x and y direction.
%The function finds the solutions by using Newtons Law of Gravitation:
% F=M*A
% A = -(G*mass/|R2-R1|^2)*(R2-R1/|R2-R1|)
%Simplfied to A = -(G*mass*(R2-R1)/|R2-R1|^3)
%The function will opereate as:
% |Vx| = |0 0 1 0| * | x | + | 0 |
% |Vy| |0 0 0 1| | y | | 0 |
% |Ax| |0 0 0 0| | Vx| | -G*Ms/R^2*|Rx| |
% |Ay| |0 0 0 0| | Vy| | -G*Ms/R^2*|Ry| |
%Function created by : Minjie Lu (11450458)
% Ryan McLaughlin (11486182)
% Luke O'Doherty (11434628)
% University College Dublin
%Created for Minor Project 2: EEEN30150 - MODELLING AND SIMULATION
%Version No:MP2_1_1
if nargin~=4
error('Require four input values: Mass of Sun, The stepsize H, The final time N, and the
initial conditions of Jupiter')
end
G=1.4879e-34 %Universal Gravitation constant in AU^3/(kg*Day^2)
Storage=zeros(2,N+1);%create a storage matrix
Storage(:,1)=Jupiter_initial_condition(1:2);
%store the initial condition in the first column of matrix
6. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
6
M-file to solve ordinary differential equation for Neptune:
This function is used to solve ODE of Newton's law of universal gravitation by using Fourth Order Runge-
Kutta method in order to find the acceleration of Neptune. For the planet Neptune, we have to take account
gravitational effects of both the Sun and Jupiter. It does so by taking six inputs which includes: Jupiter(the
resulting conditions of the first m-file),Mj(mass of Jupiter), Ms(mass of Sun),H(the stepsize),N(the final
time),and the initial conditions of Neptune, namely Neptune's position and velocity in the x and y direction.
The function is used to solve their derivatives, velocity and acceleration. And once these parameters have
been solved, they will be updated to the initial condition vector.The solutions for each step size are stored in
order to visualise the results.
function [Storage]=planet_Neptune(Jupiter,Mj,Ms,H,N,Neptune_initial_condition)
%Function operates to solve ODE of Newton's law of universal gravitation by
%using Fourth Order Runge-Kutta method in order to find the acceleration of Neptune.
%For the planet Neptune, we have to take account gravitational effects of both the Sun and
Jupiter.
%This function requires six inputs which includes:
%Jupiter(the resulting conditions of the first m-file),Mj(mass of Jupiter),
%Ms(mass of Sun),H(the stepsize),N(the final time),and the initial conditions of Neptune,
%namely Neptune's position and velocity in the x and y direction.
%The function finds the solutions by using Newtons Law of Gravitation:
Matrix_jup=zeros(4,4);
%Creating a four by four matrix that will be multiplied by the initial conditions
Matrix_jup(1,3)=1;%Filling row one, element three with a one
Matrix_jup(2,4)=1;%Filling row two, element four with a one
% Solve the ODE by using Forth order Runge-kutta method
for count = 1:N %Set up loop to begin
Init_temp = Jupiter_initial_condition;%temporary storage for the initial conditions
Accel_temp= -(G*Ms)*[0;0;Init_temp(1:2)]/(norm(Init_temp(1:2))^3);
%temporary storage for acceleration
k1=H*((Matrix_jup*Init_temp)+Accel_temp);%Evaluate k1 using old x and y
Init_temp = Jupiter_initial_condition + 0.5*k1;%Updating the initial condition vector
Accel_temp = -(G*Ms)*[0;0;Init_temp(1:2)]/(norm(Init_temp(1:2))^3);
%Updating temporary storage for acceleration
k2=H*((Matrix_jup*Init_temp)+Accel_temp);%Evaluate k2 using old x and y
Init_temp = Jupiter_initial_condition + 0.5*k2;%Updating the initial condition vector
Accel_temp = -(G*Ms)*[0;0;Init_temp(1:2)]/(norm(Init_temp(1:2))^3);
%Updating temporary storage for acceleration
k3=H*((Matrix_jup*Init_temp)+Accel_temp);%Evaluate k3 using old x and y
Init_temp = Jupiter_initial_condition + k3;%Updating the initial condition vector
Accel_temp = -(G*Ms)*[0;0;Init_temp(1:2)]/(norm(Init_temp(1:2))^3);
%Updating temporary storage for acceleration
k4=H*((Matrix_jup*Init_temp)+Accel_temp);%Evaluate k4 using old x and y
Jupiter_initial_condition=Jupiter_initial_condition+((1/6)*(k1+(2*k2)+(2*k3)+k4));
%Update InitialConditions
Storage(:,count+1)= Jupiter_initial_condition(1:2);%Store the positions
end%end to for loop
end%end to main function
7. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
7
% F=M*A
% A = -(G*mass/|R2-R1|^2)*(R2-R1/|R2-R1|)
%Simplfied to A = -(G*mass*(R2-R1)/|R2-R1|^3)
%Function created by : Minjie Lu (11450458)
% Ryan McLaughlin (11486182)
% Luke O'Doherty (11434628)
% University College Dublin
%Created for Minor Project 2: EEEN30150 - MODELLING AND SIMULATION
%Version No:MP2_2_1
if nargin~=6
error('Require six input values: Jupiter(the resulting condition of Jupiter orbit),Mass of
Jupiter,Mass of Sun, The stepsize H, The final time N, and the initial conditions of
Neptune')
end
G=1.4879e-34; %Universal Gravitation constant in AU^3/(kg*Day^2)
Storage=zeros(2,N+1);%create a storage matrix
Storage(:,1)=Neptune_initial_condition(1:2);
%store the initial condition in the first column of matrix
% Solve the ODE by using Fourth order Runge-kutta method
for count = 1:N %Set up loop to begin
Init_temp = Neptune_initial_condition;%temporary storage for the initial conditions
Accel_temp=[Init_temp(3);
Init_temp(4);
((-G*Ms*Init_temp(1))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(1,N)-Init_temp(1)))/(norm((Init_temp(1)-
Jupiter(1,N))+(Jupiter(2,N)-Init_temp(2)))^3);
((-G*Ms*Init_temp(2))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(2,N)-Init_temp(2)))/(norm((Init_temp(1)-
Jupiter(1,N))+(Jupiter(2,N)-Init_temp(2)))^3)];
k1=H*(Accel_temp);%Evaluate k1 using old x and y
Init_temp = Neptune_initial_condition + 0.5*k1;%Updating the initial condition vector
Accel_temp=[Init_temp(3);
Init_temp(4);
((-G*Ms*Init_temp(1))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(1,N)-Init_temp(1)))/(norm((Init_temp(1)-
Jupiter(1,N))+(Jupiter(2,N)-Init_temp(2)))^3);
((-G*Ms*Init_temp(2))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(2,N)-Init_temp(2)))/(norm((Init_temp(1)-
Jupiter(1,N))+(Jupiter(2,N)-Init_temp(2)))^3)];
k2=H*(Accel_temp);%Evaluate k2 using old x and y
Init_temp = Neptune_initial_condition + 0.5*k2;%Updating the initial condition vector
Accel_temp=[Init_temp(3);
Init_temp(4);
((-G*Ms*Init_temp(1))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(1,N)-Init_temp(1)))/(norm((Init_temp(1)-
Jupiter(1,N))+(Jupiter(2,N)-Init_temp(2)))^3);
((-G*Ms*Init_temp(2))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(2,N)-Init_temp(2)))/(norm((Init_temp(1)-
Jupiter(1,N))+(Jupiter(2,N)-Init_temp(2)))^3)];
k3=H*(Accel_temp);%Evaluate k3 using old x and y
Init_temp = Neptune_initial_condition + k3;%Updating the initial condition vector
Accel_temp=[Init_temp(3);
Init_temp(4);((-G*Ms*Init_temp(1))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(1,N)-Init_temp(1)))/(norm((Init_temp(1)-
Jupiter(1,N))+(Jupiter(2,N)-Init_temp(2)))^3);
((-G*Ms*Init_temp(2))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(2,N)-Init_temp(2)))/(norm((Init_temp(1)-
Jupiter(1,N))+(Jupiter(2,N)-Init_temp(2)))^3)];
k4=H*(Accel_temp);%Evaluate k4 using old x and y
8. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
8
M-file to solve ordinary differential equation for Earth:
This function is used to solve ODE of Newton's law of universal gravitation by using Fourth Order Runge-
Kutta method in order to find the acceleration of Earth. For the planet Earth, we have to take account
gravitational effects of Jupiter, Neptune and the Sun. It does so by taking eight inputs which includes:
Jupiter(the resulting conditions of the first m-file),Mj(mass of Jupiter), Neptune(the resulting conditions of
the second m-file),Mn(mass of Neptune), Ms(mass of Sun),H(the stepsize),N(the final time)and the initial
conditions of Earth, namely Earth's position and velocity in the x and y direction.
function [Storage]=planet_Earth(Jupiter,Mj,Neptune,Mn,Ms,H,N,Earth_initial_condition)
%Function operates to solve ODE of Newton's law of universal gravitation by
%using Fourth Order Runge-Kutta method in order to find the acceleration of Earth.
%For the planet Earth, we have to take account
%gravitational effects of Jupiter, Neptune and the Sun.
%This function requires eight inputs which includes:
%Jupiter(the resulting conditions of the first m-file),Mj(mass of Jupiter),
%Neptune(the resulting conditions of the second m-file),Mn(mass of Neptune),
%Ms(mass of Sun),H(the stepsize),N(the final time)and the initial conditions of Earth,
%namely Earth's position and velocity in the x and y direction.
%The function finds the solutions by using Newtons Law of Gravitation:
% F=M*A
% A = -(G*mass/|R2-R1|^2)*(R2-R1/|R2-R1|)
%Simplfied to A = -(G*mass*(R2-R1)/|R2-R1|^3)
%Function created by : Minjie Lu (11450458)
% Ryan McLaughlin (11486182)
% Luke O'Doherty (11434628)
% University College Dublin
%Created for Minor Project 2: EEEN30150 - MODELLING AND SIMULATION
%Version No:MP2_3_1
if nargin~=8
error('Require eight input values: Jupiter(the resulting condition of Jupiter
orbit),Mass of Jupiter,Neptune(the resulting conditions of the second m-file),Mass of
Neptune,Mass of Sun, The stepsize H, The final time N, and the initial conditions of
Neptune')
end
G=1.4879e-34; %Universal Gravitation constant in AU^3/(kg*Day^2)
Storage=zeros(2,N+1);%create a storage matrix
Storage(:,1)=Earth_initial_condition(1:2);
%store the initial condition in the first column of matrix
% Solve the ODE by using Fourth order Runge-kutta method
for count = 1:N %Set up loop to begin
Neptune_initial_condition=
Neptune_initial_condition+((1/6)*(k1+(2*k2)+(2*k3)+k4));
%Update InitialConditions
Storage(:,count+1)= Neptune_initial_condition(1:2);
%Store the positions
end%end to for loop
end%end to main function
9. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
9
Init_temp = Earth_initial_condition;%temporary storage for the initial conditions
Accel_temp=[
Init_temp(3);
Init_temp(4);((-G*Ms*Init_temp(1))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(1,N)-Init_temp(1)))/(norm((Init_temp(1)-Jupiter(1,N))+(Jupiter(2,N)-
Init_temp(2)))^3)-...
(G*Mn*(Neptune(1,N)-Init_temp(1)))/(norm((Init_temp(1)-Neptune(1,N))+(Neptune(2,N)-
Init_temp(2)))^3);...
((-G*Ms*Init_temp(2))/(norm(Init_temp(1:2))^3))-(G*Mj*(Jupiter(2,N)-
Init_temp(2)))/(norm((Init_temp(1)-Jupiter(1,N))+...
(Jupiter(2,N)-Init_temp(2)))^3)-(G*Mn*(Neptune(2,N)-
Init_temp(2)))/(norm((Init_temp(1)-Neptune(1,N))+(Neptune(2,N)-Init_temp(2)))^3)];
k1=H*(Accel_temp);%Evaluate k1 using old x and y
Init_temp = Earth_initial_condition + 0.5*k1;%Updating the initial condition vector
Accel_temp=[
Init_temp(3);
Init_temp(4);((-G*Ms*Init_temp(1))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(1,N)-Init_temp(1)))/(norm((Init_temp(1)-Jupiter(1,N))+(Jupiter(2,N)-
Init_temp(2)))^3)-...
(G*Mn*(Neptune(1,N)-Init_temp(1)))/(norm((Init_temp(1)-Neptune(1,N))+(Neptune(2,N)-
Init_temp(2)))^3);...
((-G*Ms*Init_temp(2))/(norm(Init_temp(1:2))^3))-(G*Mj*(Jupiter(2,N)-
Init_temp(2)))/(norm((Init_temp(1)-Jupiter(1,N))+...
(Jupiter(2,N)-Init_temp(2)))^3)-(G*Mn*(Neptune(2,N)-
Init_temp(2)))/(norm((Init_temp(1)-Neptune(1,N))+(Neptune(2,N)-Init_temp(2)))^3)];
k2=H*(Accel_temp);%Evaluate k1 using old x and y
Init_temp = Earth_initial_condition + 0.5*k2;%Updating the initial condition vector
Accel_temp=[
Init_temp(3);
Init_temp(4);((-G*Ms*Init_temp(1))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(1,N)-Init_temp(1)))/(norm((Init_temp(1)-Jupiter(1,N))+(Jupiter(2,N)-
Init_temp(2)))^3)-...
(G*Mn*(Neptune(1,N)-Init_temp(1)))/(norm((Init_temp(1)-Neptune(1,N))+(Neptune(2,N)-
Init_temp(2)))^3);...
((-G*Ms*Init_temp(2))/(norm(Init_temp(1:2))^3))-(G*Mj*(Jupiter(2,N)-
Init_temp(2)))/(norm((Init_temp(1)-Jupiter(1,N))+...
(Jupiter(2,N)-Init_temp(2)))^3)-(G*Mn*(Neptune(2,N)-
Init_temp(2)))/(norm((Init_temp(1)-Neptune(1,N))+(Neptune(2,N)-Init_temp(2)))^3)];
k3=H*(Accel_temp);%Evaluate k3 using old x and y
Init_temp = Earth_initial_condition + k3;%Updating the initial condition vector
Accel_temp=[
Init_temp(3);
Init_temp(4);((-G*Ms*Init_temp(1))/(norm(Init_temp(1:2))^3))-...
(G*Mj*(Jupiter(1,N)-Init_temp(1)))/(norm((Init_temp(1)-Jupiter(1,N))+(Jupiter(2,N)-
Init_temp(2)))^3)-...
(G*Mn*(Neptune(1,N)-Init_temp(1)))/(norm((Init_temp(1)-Neptune(1,N))+(Neptune(2,N)-
Init_temp(2)))^3);...
((-G*Ms*Init_temp(2))/(norm(Init_temp(1:2))^3))-(G*Mj*(Jupiter(2,N)-
Init_temp(2)))/(norm((Init_temp(1)-Jupiter(1,N))+...
(Jupiter(2,N)-Init_temp(2)))^3)-(G*Mn*(Neptune(2,N)-
Init_temp(2)))/(norm((Init_temp(1)-Neptune(1,N))+(Neptune(2,N)-Init_temp(2)))^3)];
k4=H*(Accel_temp);%Evaluate k4 using old x and y
Earth_initial_condition=Earth_initial_condition+((1/6)*(k1+(2*k2)+(2*k3)+k4));
%Update InitialConditions
Storage(:,count+1)= Earth_initial_condition(1:2);%Store the positions
end%end to for loop
end%end to main function
10. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
10
Visulisation:
The final part of the project was to develop a method by which the results could be visualised. By creating a
function M-File, which used the function M-File ODE’s which Minjie had created, the paths of the planets
could be visualised. Implementing the Matlab commands plot and surf, a sphere could be created for the
planets and the sun. This could then be animated, showing the planets and their paths orbiting the sun for 3
Jovian years.
The first step of the M-File was to assign the initial positions, initial velocities and masses of each planet
(shown in Table 1) to a variable so they could be used in the calculation of the visualisation. Both the initial
positions and velocities used Cartesian co-ordinates excluding the z-direction. Also the step size, H, and
final time, N, had to be chosen.
The same process was undertaken for Earth and Neptune.
The next step was to plot the sun which is fixed at the centre of the orbit. Again using Table 1, selecting the
value for the radius of the sun in Au and the surf command, the sun could be created as a sphere and c then
coloured yellow. The hold on command is then used so further plots can be added. The background is
coloured black to mimic the colour is space.
function [Animation] = Orbit
%Function is used to calculate the orbit of Earth, Jupiter and Neptune
%around the sun. Newton's law of universal gravitation is combined with the
%fourth order Runge-Kutta method. The initial conditions of each planet's
%mass, position and velocites are inputted. The ODEs are solved by
%implementing the function M-Files for each planet; planet_Jupiter,
%planet_Earth and planet_Neptune which use the above conditions. Each
%planet is created used using the surf function and position vectors are
%assigned which depicts their circular motion. The planets are visualised
%graphically.
%Function created by: Luke O'Doherty (11434628)
% Minjie Lu (11450458)
% Ryan McLaughlin (11486182)
%Date: 17th May 2014
%Version No:MP2_4_1
H=7; %this is our step size for the rung kutta method in days
N=3*12*52; %time in 3 Jovian years
Mj=1.89813e27; %Mass of Jupiter in kg
%Jupiter Initial Conditions
Jupx=-2.3021578957356; %position in the X direction (AU)
Jupy=4.70662422303194; %position in the Y direction (AU)
Velocity_Jupx=-6.86942440147889e-3; %Velocity in the X direction (AU/day)
Velocity_Jupy=-2.95871721235009e-3; %Velocity in the y direction (AU/day)
Jupiter_initial_condition=[Jupx,Jupy,Velocity_Jupx,Velocity_Jupy]';
11. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
11
Next, the paths of each planet were created using the Function M-File ODE’s created by me. The plot
command was used to visualise this.
The planets could now be plotted by in the same way as the sun was plotted. A for loop was used, starting at
one day and ending with final time, N, which is three Jovian years.
%SUN PLOTTING
Rs=0.00465448*120;%Radius of sun (AU)
angleZ=linspace(0,3.14,30); %the range of the angle with respect to the z-axis
angleX=linspace(0,6.28,40); %the range of the angle with respect to the z-axis
[angleZ,angleX]=meshgrid(angleZ,angleX);%Change the values into array form used
%for the surface plot
x=Rs*sin(angleZ).*cos(angleX); %The x co-ordinate for sphere
y=Rs*sin(angleZ).*sin(angleX); %The y co-ordinate for sphere
z=Rs*cos(angleZ); %The z co-ordinate for sphere
surf(x,y,z,'EdgeColor','yellow','FaceColor','yellow')%Plots the sphere based on
previous co-ordinates
set(gca, 'color', [0 0 0]);
set(gcf, 'color', [0 0 0]);
axis off;
hold on
%%%% Calling the ODE functions %%%%
%Starts the ODE function, implementing the fouth order Runge-Kutta
[Jupiter]=planet_Jupiter(Ms,H,N,Jupiter_initial_condition);
plot(Jupiter(1,:),Jupiter(2,:),'m'); %Plots the orbit of the Jupiter's course
hold on
[Neptune]=planet_Neptune(Jupiter,Mj,Ms,H,N,Neptune_initial_condition);
plot(Neptune(1,:),Neptune(2,:),'c') %Plots the orbit of the Neptune's course
hold on
[Earth]=planet_Earth(Jupiter,Mj,Neptune,Mn,Ms,H,N,Earth_initial_condition);
plot(Earth(1,:),Earth(2,:),'b'); %Plots the orbit of the Earth's course
hold on
leg=legend('Sun','Jupiters Orbit','Neptunes Orbit','Earths Orbit'); %inserts a legend
set(leg,'Textcolor','white') %turns the letters white
%Plotting the Planets
for count=1:N
%JUPITER PLOTTING
Rj=4.77895e-4*750;%Radius of jupiter in (AU)
angleZ=linspace(0,3.14,30);
angleX=linspace(0,6.28,40);
[angleZ,angleX]=meshgrid(angleZ,angleX);
x=Rj*sin(angleZ).*cos(angleX);
y=Rj*sin(angleZ).*sin(angleX);
z=Rj*cos(angleZ);
plothandle=surf(x+Jupiter(1,count),y+Jupiter(2,count),z,'EdgeColor','m',
'FaceColor','m');%coloured in pink
hold on
12. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
12
All the planets have now been visualised at each step and can now be put into an animation. A frame is
saved for each step in the for loop and it is then delerted each time before a new frame is displayed. This
gives the effect of the planet orbiting the sun.
%NEPTUNE PLOTTING
Rn=1.6555e-4*1250;
angleZ=linspace(0,3.14,30);
angleX=linspace(0,6.28,40);
[angleZ,angleX]=meshgrid(angleZ,angleX);
x=Rn*sin(angleZ).*cos(angleX);
y=Rn*sin(angleZ).*sin(angleX);
z=Rn*cos(angleZ);
plothandle1=surf(x+Neptune(1,count),y+Neptune(2,count),z,'EdgeColor','c',
'FaceColor','c');%coloured in light blue
%EARTH PLOTTING
Re=4.26352e-5*1500;
angleZ=linspace(0,3.14,30);
angleX=linspace(0,6.28,40);
[angleZ,angleX]=meshgrid(angleZ,angleX);
x=Re*sin(angleZ).*cos(angleX);
y=Re*sin(angleZ).*sin(angleX);
z=Re*cos(angleZ);
plothandle2=surf(x+Earth(1,count),y+Earth(2,count),z,'EdgeColor','g', 'FaceColor','g');
%coloured in green
axis equal; %equal axis length is all directions
Animation(count)=getframe; %Saves a frame for each step
delete(plothandle);%Deletes the previous plot of Jupiter so only one sphere appears
in each frame
delete(plothandle1);%Deletes the previous plot of Neptune so only one sphere appears
in each frame
delete(plothandle2);%Deletes the previous plot of Earth so only one sphere appears
in each frame
end%end to for loop
end%end to main function
13. UNIVERSITY COLLEGE DUBLIN EEEN30150 MODELLING AND SIMULATION
Minor Project II Report Minjie Lu 11450458
13
The animation can be seen by the link below (created by Luke O’Doherty):
https://www.youtube.com/watch?v=yGQoFhS6xxg&feature=youtu.be
Website Reference:
[1]:http://nasasearch.nasa.gov/search?utf8=%E2%9C%93&sc=0&query=mass+of+earth&m=&affiliate=nasa &commit=Search
[2]: http://ssd.jpl.nasa.gov/horizons.cgi#results
Figure: picture of the animation for the orbiting planets