|
[Sponsors] |
Solving a Problem using the fourth order Runge-Kutta method |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 18, 2018, 14:08 |
Solving a Problem using the fourth order Runge-Kutta method
|
#1 |
New Member
cenker aktemur
Join Date: Oct 2018
Posts: 2
Rep Power: 0 |
Imagine a steel sphere of diameter d is dropped in air with density p_f = 1.29 kg/ m 3 and kinematic viscosity coefficient v = 1.49x10^-5 m 2 Is. The density of the steel sphere is p = 8x10^3 kg/ m^3 and the gravitational acceleration is g = 9·.81 m/s^2 . Now, write and run a Fortran code by employing the fourth order Runge-Kutta method in order to examine numerically the motion of the steel sphere. Run the code until Tmax = 5 seconds is reached, h = 0.1 s. is suggested for the time step. Plot the time history of the displacement and the velocity for steel spheres of different diameters; d = 0.07, 0.02, 0.01 and 0.001 m.
CAN ANYONE HELP ME ABOUT PROBLEM ABOVE ? CAN YOU WRITE FORTRAN CODE ? IF YOU HELP ME, I REALLY APPRECIATE IT. THANK A BUNCH. |
|
October 18, 2018, 15:34 |
|
#2 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 8 |
Hi,
Sincerely I don't think that anybody here can write the code for you since it is too time consuming what you can expect is some advice or point of view to your problem. Here there is mine: this problem looks like an assignement. What you should do in my opinion is to write down the equation of motion for the sphere. You know that my''= Fw + Fdrag where Fw is the weight (you know the sphere's density) and Fdrag=0.5*rhof*D^2*Cd*y'*y'. This is a non linear equation since both the velocity is squared and Cd depends on Re and thus on the velocity. In order to solve it split the second order ode in two first order odes putting y'=u and thus y''=u'. Rk4 is very popular, look for this scheme in google. Also here you can find a sample code: http://www.pdas.com/fallingBodyCalculation.html. Hope this helps! |
|
October 18, 2018, 17:57 |
|
#3 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
I would strongly discourage the use of the forum for homework
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Segmentation fault when using reactingFOAM for Fluids | Tommy Floessner | OpenFOAM Running, Solving & CFD | 4 | April 22, 2018 12:30 |
chtMultiRegionSimpleFoam turbulent case | Aditya Patil | OpenFOAM Running, Solving & CFD | 6 | April 24, 2017 22:13 |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 02:20 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 04:03 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 11:16 |