Code Monkey home page Code Monkey logo

python_differential_equations's Introduction

python_differential_equations

research work on the numerical solution of first-order differential equations

Task

Using the Euler and Runge-Kutta methods of the 4th order, find a solution to an ordinary differential equation describing the following physical problem:

A force depending on time t according to the law F = b(τ - t)exp(-t/τ) began to act on a resting particle of mass m at the moment t = 0, where b is a positive constant, τ is the time during which this force acts. Find the momentum of a particle as a function of time.

Before writing a program, it is necessary to compose the differential equation itself in the form dx/ dt = f(x, t), where x is the desired function, t is an independent variable (for example, time), f is a known (analytically specified) dependence.

Implementation

The values of all input parameters are read from the file in.txt in format:

<b paremeter>
<tau parameter>
<number of splittings>
<step size>
<t_0 starting time>
<p_0 pressure at t_0>

The solution outputs to the files out1.txt and out2.txt. The solution means a list of time points and a list of values of the desired function at these time points.

python_differential_equations's People

Contributors

mick3l avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.