# All Questions

31 questions
Filter by
Sorted by
Tagged with
2answers
124 views

### Initial values of position (x) and speed (v) of a particle visualizing using Mathematica

$$\vec{F}(\vec{r})=-m\omega^2\begin{pmatrix}x\\4y\end{pmatrix}$$ I have the force $F$ shown above. How could I specify the initial values of position ($x$) and speed ($v$) in Mathematica using the <...
1answer
254 views

### Solving Differential Equation System for HIV Treatment Model

I was working on a project about optimal strategies for HIV treatment, models used from [Butler, Kirschner, and Lenhart] 1997. This model explains the spread of HIV viruses in the human body, where ...
1answer
228 views

### How to directly input calculated Geodesic differential equation into *NDSolve*

I am trying to find the trajectory of a test particle around a relativistic object. Initially, I was trying the Kerr metric as spacetime but the final simulations clearly were not correct as I saw the ...
1answer
66 views

2answers
332 views

### Calculating the current through coil with a flyback diode using NDSolve

I plan to simulate the current through a coil with flyback (or freewheel) diode for an arbitrary voltage signal (square or PWM modulated signal is possible). You can find the circuit diagram over ...
0answers
105 views

### How to avoid unnecessary calculations in a numerical simulation and improve performance? [closed]

Corresponding to the previous question I posted: Discontinuous boundary condition distorts in the numeric solution. ...
0answers
103 views

### How to define inclusions in FEM/NDSolve? [closed]

I am trying to simulate the compaction process of hot mix asphalts and want to do this with mathematica's FEM libraries. How can I define inclusions in meshes (i.e aggregate particles in the binder) ...
1answer
209 views

### Issues with modeling pulses in a very simple system of DAEs

Bug introduced in 10.4.1 or earlier and fixed in 11.0.0 Bug has been confirmed by WRI [Case:3594387]: It does appear that the NDSolve function is not behaving properly in this case and an incident ...
1answer
478 views

### Beam deformation due to localized force distribution

I would like to simulate the deformation of a beam which is fixed on one end and has some localized forces applied along the top. I have been inspired by this Mathematica example: http://www....
2answers
523 views

### Solving coupled first-order autonomous differential equations

I am trying to run a simulation of a circuit to observe chaotic behavior, and have obtained a set of differential equations from an analysis of the circuit. I thought perhaps I could produce a plot ...
2answers
893 views

### Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method

Motivation I am using Mathematica to implement System Dynamics (SD) models, e.g. differential equation models as applied to management/economic problems following the "methodology" of Jay W. ...
1answer
127 views

### My simulation is not never finishing and it is taking so much time?

I am running simple code which involves calculation of two first order differential equations.It is taking so much time and i am unable to get the results as the simulation is never finishing. ...
1answer
386 views

### Simulate a polygon bouncing with collision detection inside a circle/polygon

Simulate a polygon bouncing with collision detection inside a circle/polygon. the example can be see in help page by searching WhenEvent; ...
0answers
158 views

### How to control pedestrians to enter the simulation region with random functions?

I am working on simulating crowds of a cross-typed region, given that pedestrians entering from 4 gates of north, east, west and south, ...
1answer
623 views

### Optimizing Monte Carlo simulation of a Pred-Prey model

My assignment and code As part of an assignment for one of my classes, I'm trying to run a "massive" Monte Carlo simulation in Parallel on the follow model: ...
2answers
632 views

### Partial Differential Equation in Parallel

is there any native way to implement multi-core parallel solving of PDE in Wolfram Mathematica? WM 10 now supports Finite Elements Method, but it is actually useless without parallelization. Usually ...
4answers
7k views

### Animation of double pendulum

Sadly, I am a completely newbie. I am studying Physics and in our theoretical physics class we got the task to solve the double pendulum using Mathematica. We just got the program, but no introduction ...
1answer
560 views

### NDSolve with arrays and Tables of Equations and WhenEvent

I've been toying around with NDSolve for a while, and read through the website. By doing so I discovered that I could use it for vectors and arrays with much pleasure. So I wanted to write a simple ...
1answer
1k views

### Detecting a collision in n-body simulation with NDSolve

Consider this three-body system: ...
5answers
900 views

### Problem using WhenEvent to constrain solution

Note: This question has also been posted at the Wolfram Community Problem: Simulate pressure in volume 1 and 2 for 1 second. The circuit is as follows: From this I set up the governing DE for both ...
1answer
589 views

### Changing a wave simulation

I want to adjust some code that I found on this Wolfram Demonstration: http://demonstrations.wolfram.com/WaterRipplesPassingThroughASlit/ Basically it shows a wave passing through a single slit. I ...
2answers
1k views

### Running a Numerical Simulation on a System of Differential Equations with unique initial conditions

I have a system of differential equations as follows: ...