Fortran Discrete Element Method in FORTRAN 90 for collisions of particles

AI Thread Summary
The discussion revolves around a request for a simple implementation of particle collision modeling in FORTRAN 90, particularly from a beginner's perspective. The original poster is seeking guidance due to an academic requirement and has prior experience mainly in C++. Participants emphasize the importance of understanding the mathematical algorithms behind particle collisions before diving into coding. They suggest starting with simple scenarios to facilitate learning FORTRAN effectively. There is also a focus on developing a clear plan, including relevant formulas and pseudo-code, before translating ideas into actual code. The need for appropriate output formats, such as lists of coordinates or animations, is highlighted, with suggestions to use tools like Gnuplot for visual representation. Overall, the conversation stresses foundational learning and careful planning in programming for particle collisions in FORTRAN.
Purahei
Messages
9
Reaction score
0
Does anyone know a simple implementation in FORTRAN 90 of collisions of particles?
 
Technology news on Phys.org
Purahei said:
Does anyone know a simple implementation in FORTRAN 90 of collisions of particles?
Have you done any research on your own?
 
Yes, but most of them are in C++. Actually I'm beginner in Fortran.
 
Why do you want a FORTRAN implementation?
 
It is an academic requirement
 
Can you clarify what you are looking for - is it
  1. a library that implements a (not simple) algorithm for modelling collisions in a system of many particles so that you can incorporate it into a project? Or
  2. some Fortran code that models a collision between two particles so you can copy it for an assignment?
 
So the goal for you is to learn Fortran, not google. This your first assignment ?

Reason I ask is because you mention 'discrete element method' in your thread title: pretty narrow.

Whilst post #1 mentions 'collisions of particles' which is xxxx wide ( just try to imagine how much code sixty years of high energy physics has generated ).

Before you even begin programming: work out a plan what you want to do, collect the relevant FORmulas, and don't start TRANslating into code until you have put together the simplest possible case, written an algorithm in pseudo-language and worked it out by hand, on a piece of paper .
 
  • Like
Likes enosis_, Purahei and pbuk
pbuk said:
Can you clarify what you are looking for - is it
  1. a library that implements a (not simple) algorithm for modelling collisions in a system of many particles so that you can incorporate it into a project? Or
  2. some Fortran code that models a collision between two particles so you can copy it for an assignment?
I have to create a program in Fortran that models a system of particles. Because I'm new in that language, I would like to have a reference to start.
 
I get plenty hits with 'fortran code for simple collisions of particles' or 'computer code for simple collisions of particles'.
Purahei said:
program in Fortran that models a system of particles
Very ambitious indeed. Again: This your first assignment ? Do you have programming experience with other languages ?

Why not start with the simplest possible situations
More than good enough to learn fortran

Making things difficult can be a second step :smile:
(see first -animated- picture same page)​

Anyway: what do you have in mind in the form of output ? long lists of t, x, y, ... or something else ?
 
  • #10
Purahei said:
I have to create a program in Fortran that models a system of particles. Because I'm new in that language, I would like to have a reference to start.

The references would be :

a) creating a suitable math algorithm for doing that, and
b) a Fortran reference card, and
c) a decent methodology suitable for the problem.
 
Last edited:
  • #11
BvU said:
I get plenty hits with 'fortran code for simple collisions of particles' or 'computer code for simple collisions of particles'.
Very ambitious indeed. Again: This your first assignment ? Do you have programming experience with other languages ?

Why not start with the simplest possible situations
More than good enough to learn fortran

Making things difficult can be a second step :smile:
(see first -animated- picture same page)​

Anyway: what do you have in mind in the form of output ? long lists of t, x, y, ... or something else ?
Yes, and then make an animation with those results.
 
  • #12
You sure you are required to use fortran for that animation too ? Perhaps with the use of some library ?
 
  • #13
I will use Gnuplot or GID
 
  • #14
Purahei said:
Does anyone know a simple implementation in FORTRAN 90 of collisions of particles?
Purahei said:
Yes, but most of them are in C++. Actually I'm beginner in Fortran.
Purahei said:
It is an academic requirement
This all seems very odd to me, if you're expected to write a program about particle collisions, but have no experience in writing Fortran code. Are you in a university class, and is the expectation that you already know how to write programs?
 
  • Like
Likes BvU

Similar threads

Replies
3
Views
677
Replies
2
Views
1K
Replies
4
Views
1K
Replies
3
Views
2K
Replies
9
Views
4K
Replies
2
Views
2K
Replies
19
Views
6K
Back
Top