simulation

Getting NaN values from the model using FMPy

Getting NaN values from the model using FMPy Question: I’m running an FMU export from Simcenter that runs on 5e-7 step-size in FMPy. However, after a few steps the FMU starts returning NaN values. My expectation is that this is due to the way I am using FMPy, but I am unable to solve it …

Total answers: 1

Something goes wrong calculating the slope of the simulation

Something goes wrong calculating the slope of the simulation Question: In this python code we are trying to simulate the path of a frisbee that is being shot from a shooter with a certain angle (alpha0). The angle of attack should be the angle at which its being shot, minus the slope of its path. …

Total answers: 1

Simulating factory manufacture with simpy by requesting multiple resources at the same time, but running for different time

Simulating factory manufacture with simpy by requesting multiple resources at the same time, but running for different time Question: I was trying to simulate a factory manufacturing different products with different machines with simpy. For each product, we will need to allocate different machines for production. For example, the first product will ask for machines …

Total answers: 2

Why does the moon spiral towards Earth in simulation?

Why does the moon spiral towards Earth in simulation? Question: I am trying to simulate a somewhat realistic program where Earth and the moon can interact gravitationally with each other. Now the problem is that the moon keeps on spiraling towards Earth and I don’t understand why. This is my code: from math import sin,cos,sqrt,atan2,pi …

Total answers: 1

Simpy: Callcenter simulation – inactive call timeout

Simpy: Callcenter simulation – inactive call timeout Question: currently I am working on a more or less complex callcenter simulation. I am quite new to Simpy and have a problem with timing out calls if no agent could answer them. In my simulation I generate calls in 4 different queues. Each of them should have …

Total answers: 1

How to simulate a heat diffusion on a rectangular ring with FiPy?

How to simulate a heat diffusion on a rectangular ring with FiPy? Question: I am new to solving a PDE and experimenting with a heat diffusion on a copper body of a rectangular ring shape using FiPy. And this is a plot of simulation result at some times. I am using the Grid2D() for a …

Total answers: 2

How to see a distribution of outcomes of a while loop?

How to see a distribution of outcomes of a while loop? Question: Imagine you have a while loop that includes a random outcome so that the output of the while loop is different each time. How can you simulate the while loop many times and see the distribution of outcomes? I know how to run …

Total answers: 1

Bioreactor Simulation for Ethanol Production using GEKKO

Bioreactor Simulation for Ethanol Production using GEKKO Question: I am trying to simulate a DAE system that solves a fed-batch bioreactor problem for ethanol production using GEKKO. This is done so I can later optimize it more easily to maximize Ethanol production. It was previously solved in MATLAB and produced the results as shown in …

Total answers: 1