Questions tagged [modeling]
Questions about approaches for simulating physical systems or phenomena by building from related understanding and basic principles.
217 questions
1
vote
1
answer
117
views
Is Mathematica enough powerful to simulate turbulence flow around a wing(3D) or a gas turbine blade? [closed]
I was searching and reading something about Mathematica and it was very interesting when realized it can simulate the fluid flow around solids but does anybody succeed to simulate turbulence flow ...
1
vote
2
answers
115
views
Numerical Stiffness Issue in NDSolve for Stiff ODE System: How to Avoid Extrapolation Errors?
I am trying to solve a stiff system of ode differential equations (ODEs) using NDSolve in Wolfram Mathematica. The problem is related to modeling the dynamics of proteins over time, with parameters ...
0
votes
0
answers
77
views
NDSolve for a set of 3 ODEs is taking too long to solve
I am modelling solvent density in a porous medium (domain $0<x<3$ for bulk solution, domain $3<x<6$ for the porous medium) under applied pressure and constant flux, by solving a system of ...
0
votes
0
answers
24
views
Getting around inconsistent boundary/initial conditions for coupled PDEs
I am trying to model + and - charges in a 1d box. I want to start out with uniform concentrations of both (2 in the code below) and then turn on an electric field so the charges separate to either end ...
2
votes
1
answer
51
views
Unwanted Oscillation in Solution Occurs When Solving Poisson-Nernst-Planck Equation
This is a follow-up post for this question. I am trying to solve the Poisson-Nernst-Planck equation in the form similar to eqns 9 and 10 in this research paper.
Different than the previous question, ...
1
vote
1
answer
78
views
Singularity error when solving Poisson-Nernst-Planck equation
I am trying to solve the Poisson-Nernst-Planck equation in the form similar to eqns 9 and 10 in this research paper.
To simplify matter, I only consider single ion species ($i=1$) for $\rho_e$, where ...
2
votes
1
answer
95
views
Fitting data to a system of ODE using ParametricNDSolveValue
I am trying to create the following code to fit data to a system of ODE.
...
1
vote
0
answers
52
views
How does NDSolve deal with a delay variable [closed]
For a project I'm using an SIR model to simulate a Zika virus outbreak. And I solve a set of differential equations using NDSolve with specific initial conditions. ...
1
vote
1
answer
133
views
Problem Encountered when Solving a System Consisting of Two PDEs and an ODE in a Semi-NDSolve-based Approach
This is a continuation for question 300522.
Firstly, I have changed the equation for $C_{2\text{b}}^* $ in my system. The updated $C_{2\text{b}}^* $ is expressed as below:
$$
\begin{equation}
C_{2\...
0
votes
0
answers
90
views
Specifying Prescribed Mesh to Solve for a System Consisting of Two PDEs and an ODE
I am solving the following equations:
$$
\frac{\delta C_{1\text{f}}^*}{\delta t^*} = \frac{\overline{t}}{\overline{x}^2} \frac{\delta}{\delta x^*} \left\{ \mathcal{D} \left[ \frac{\delta C^*_{1\text{f}...
0
votes
0
answers
36
views
Modeling with different outputs size
I have lists of input and output. I want to perform the prediction operation but my outputs are different for each input and this causes an error. Can someone help me to write the model in such a way ...
1
vote
1
answer
59
views
Troubleshooting NDSolveValue::rdelay Error in a Dengue Epidemic Model with Delay Differential Equations in Mathematica
I am modeling the vector dynamics of a dengue epidemic using a system of delay differential equations (DDEs) in Wolfram Mathematica. My model includes a complex interplay of host-vector interactions, ...
-2
votes
1
answer
86
views
Novice Mathematica User: Plots are very small despite changing image size option
I'm currently writing a paper about marine chemistry and I'm trying to include a reactive transport model that was written in mathematica by a collaborator. I have a lot of experience in SAS, but I ...
1
vote
2
answers
344
views
Graphing curves formed by a rolling polygon
I am trying to make a Mathematica graphing function that would generalize common phenomena. How would I do this?
From a circle, we can generate a cycloid (if rolling on a line) or a sine wave (if ...
1
vote
1
answer
359
views
Fitting delay differential equations (DDE)
I have the following differential equations:
$$S'(t) = 0.31 S(t) \Big( 1 - \frac{S(t)}{6.19} \Big)- \frac{a}{1 + B(t)} S(t),$$
$$B'(t) = c (1 - B(t)) - d B(t) S(t) - 3 c (1 - B(t - 18)),$$
where $B(t -...
3
votes
2
answers
258
views
Optimizing an ODE fitting algorithm with interpolated data
Given data, I want to find parameters $p_1,p_2,k_1,k_2>0$ that fit the following ODE system
$$
\begin{align}
b'(t)&=p_1 a(t)-k_1b(t)\\
c'(t)&=p_2b(t)-k_2c(t)
\end{align}
$$
where $a(t)$ is ...
1
vote
1
answer
262
views
Finding Contours in Photo to Create a Topographical Map
I am setting up a special table to simulate the scenario in this problem in this problem, but instead of finding the geodesics, I want to create a topographical map using the contours.
Here is a ...
3
votes
1
answer
133
views
How to optimize ODE parameter fitting?
Consider the data
...
1
vote
1
answer
60
views
How to fit a linear ODE system?
Consider the equations
$$
\begin{align}
b'(t)=p_1 c(t)-k_1b(t),\\
c'(t)=p_2b(t)-k_2c(t)
\end{align}
$$
Given data on $b$ and $c$, and initial conditions, how do I find the best fitting parameters $k_1,...
0
votes
1
answer
97
views
Tracking сode performance with the conservation of energy
I am working with the Momentum Principle as defined by Chabay and Sherweood in their text Matter and Interactions (pf = pi+Fnet dt). The following code has been created to automate the process of ...
5
votes
3
answers
307
views
Plotting Incidence function of the SIR Model
I am working on the SIR model and I am trying to plot the incidence function on a specific time interval.
...
2
votes
1
answer
110
views
Need an equation for modeling Tytler's Cycle
In all cultures over all time there appears, in different languages for different countries, the maxim "Shirtsleeves to shirtsleeves in three generations." This is a function with three ...
1
vote
3
answers
241
views
Finding a continuous distribution that fits the empirical density of dataset $1,1/4,1/9,1/16\ldots$
I have a list of coefs of the form $1,1/4,1/9,1/16,\ldots,1/d^2$ sampled with relative sampling frequencies $1,1/4,1/9,1/16,\ldots,1/d^2$.
How do I find a nice continuous density whose CDF closely ...
3
votes
1
answer
290
views
Implementing and testing boundary conditions in polar coordinates for convection-diffusion equation
I am modeling a system using the convection-diffusion equation on a 2D, radially symmetric space. I wanted to do some sanity checks to make sure I am coding it correctly. I set up a situation where I ...
0
votes
1
answer
74
views
Nucleation models in Mathematica
Are there any nucleation models available in Mathematica? In particular, I am looking to implement a version of the Kolmogorov-Johnson-Mehl-Avrami model to analyze phase-transition kinetics in one ...
3
votes
0
answers
180
views
FindDistribution analog: automated data modeling with all Wolfram statistical distributions
BOUNTY GOAL
To get bounty I am asking to build a function that serves as an analog of FindDistribution. You can also simply re-implement ...
8
votes
2
answers
447
views
Alternative Material Models for Finite Element
The Solid Mechanics capabilities of Mathematica make it an interesting alternative to using other software especially when considering multi-physics problems. I would like to collect here (for the ...
5
votes
1
answer
160
views
Spalart-Allmaras turbulence model
In this post Alex gives an implementation of the Spalart-Allmaras turbulence model [1, 2]. The example produces reasonable results, as far as I can tell. However, the implementation Alex uses deviates ...
0
votes
1
answer
156
views
Extension of: Numerically solving a system of SDE's with Levy noise?
A great answer by Alex is to be found here for my original question: Numerically solving a system of SDE's with Levy noise?
Now Let us perturb this system with time delays so the system is:
\begin{...
4
votes
1
answer
491
views
Implementation of FEM to steady-state coupled fluid flow and heat transfer
This is a steady-state conjugate heat transfer problem (the time-independent version of this problem). The problem is conjugate as the energy equation is being solved in thermally connected solid and ...
7
votes
1
answer
338
views
Modelling heat transfer in periodically reversing flow
This is a heat transfer problem, which involves reciprocating (fully-reversing) fluid flow over a heated block of solid. The objective is to determine the temperature field in the solid and the fluid ...
14
votes
2
answers
987
views
How to Create Kapitza's Pendulum?
Hi, I have never worked on a project of this kind before. I am having difficulty using Kapitza's Pendulum (inverted pendulum with moving vertical base).
It is hard for me to make the model equations, ...
7
votes
1
answer
380
views
Refining mesh size leads to absurd results for a coupled heat transfer FEM model
I have been recently solving a conjugate heat transfer problem, which involves fully-reversing or reciprocating flow of fluid over a heated block of solid. The problem is 2D and the temperature field ...
2
votes
1
answer
171
views
Directly calculating the cyclic steady state of a time-periodic conjugate heat transfer problem
Context
The following transient problem is the reciprocating (i.e., fully reversing) flow of a fluid $0<x<L, 0<y<d$ over a thick heated block $0<x<L, -e<y<0$ until the system ...
1
vote
0
answers
80
views
Some conceptual doubts about steady and transient solvers of the NS + energy equations
Recently, I have been solving some transient and steady, flow and heat transfer problems in Mathematica. The transient problem is essentially the reciprocating (i.e., fully reversing) flow of a fluid ...
7
votes
1
answer
530
views
Numerically solving a system of SDE's with Levy noise?
Consider this system from the following paper titled: The long-time behaviour of a stochastic SIR epidemic model with distributed delay and multidimensional L´evy jumps
https://arxiv.org/pdf/2003....
4
votes
2
answers
125
views
ParametricPlot for phase field error (case: Predator-Prey Model) [closed]
so I have a task that need to draw a phase field of predator-prey model, but first I tried my lecturer's coding:
...
1
vote
0
answers
79
views
Modeling Experimental data with a CDF
I have some data plotted above which relates two variables that were derived experimentally. I'm trying to fit a cumulative distribution function to it so that we can take a sample of Y at X. I've ...
1
vote
1
answer
171
views
Fitting a sum of three lorentzian based on a dataset
as you can see below, I have developed a code that allows me to fit the present dataset via a Lorentzian. Now what I should do is to develop a sum of three Lorentzians based on this model so that this ...
2
votes
1
answer
272
views
Fitting a Lorentzian curve to data
Good morning everyone,
regarding my research "high resolution laser spectroscopy" I would like to fit the data obtained from the experiment with a Lorentzian curve using Mathematica, so as ...
1
vote
0
answers
64
views
How to take a derivative of a function with respect to another function inside the function?
I have these two equations:
...
4
votes
1
answer
585
views
My model has not finished evaluating in more than a day so can't test if it works, what is wrong with it?
Hello I have this modified monocentric city model that I have been working on for a while.
Sorry for the long post, I wanted to add the whole code, because it's all connected.
My suspicion is that it ...
2
votes
1
answer
277
views
The nonlinear state-space model of a spherical pendulum cannot be linearized and cannot be controlled?
I am attempting to model and control a spherical pendulum. I have derived the equations as follows:
...
0
votes
0
answers
279
views
How to plot elements from an array?
Im trying to solve a differential equation for a range of parameters (1->4). I then want to automatically plot a graph for each of those parameters.
...
0
votes
0
answers
991
views
7
votes
4
answers
818
views
Showing that a Hopf bifurcation exists?
I have the following system of ODEs:
dx/dt = a/(1 + z) - Q*z
dy/dt = Qx - qy
dz/dt = qy - cz/(K + z).
Assuming K = 1, Q = q < c, and a = c*(Sqrt[c/Q] - 1), is there a way to use Mathematica to test ...
11
votes
1
answer
318
views
Generating random sequence of integers with ordering constraints
I would like to write a Mathematica routine for generating random musical melodies that obey (some of) the constraints of traditional tonal harmony. For simplicity's sake, I'm interested only in ...
0
votes
1
answer
225
views
Can Mathematica do thermal/mechanical analysis of modeled solid systems?
I want to do thermal and mechanical analysis of various parts which may have complicated geometries.
I am contemplating buying SolidWorks because it does this: you model the part and then use their ...
4
votes
0
answers
80
views
Why is EstimatedProcess so slow for a vector ARProcess?
I'm trying to fit some 4 x N data to a vector auto-regressive model. However, EstimatedProcess is very slow for this. For a 4-th order vector AR process, it takes more than 10 seconds (for N approx. ...
2
votes
1
answer
97
views
select the right numbers based on a condition
I want to optimize my stock portfolio based on three components:
the price of the different stocks
the number to buy of each of the stocks
the expected return of each stock (after 12 months)
For ...