Questions tagged [modeling]
Questions about approaches for simulating physical systems or phenomena by building from related understanding and basic principles.
194
questions
2
votes
1
answer
253
views
How to Make a Bifurcation plot of a non linear system of ODEs
I am modelling bacterial growth. I have a quite difficult non linear systems of ODE's. I have 2 bacteria that i'm modelling with competition, as wel as transfer to a different place. so there are 2 ...
0
votes
0
answers
95
views
Error in Monte Carlo simulation. Now Random walk (dotted curve) doesn't fit to the analytical curve (dashed curve)
I've been trying to code a kinetic monte carlo simulation for a system of consecutive chemical reactions using a fixed (repaired) code that the user flinty gives me in the last questions I post:
...
3
votes
1
answer
256
views
Stiff System of ODEs: NDSolve Convergence Issues
I have tried to use NDSolve for solving 4th order coupled ODEs problems (see the attached codes). The MMA solver fails to solve this problem.
...
2
votes
1
answer
173
views
NDSolve Convergence Issue for Coupled Field Problems
I have tried to use NDSolve to solve a coupled field Eqs (see the attached Codes). The MMA solver seems to failed to converge to the requested accuracy or precision within 100 iterations
...
1
vote
1
answer
86
views
Strange error not found in a monte carlo code, Infinite expression 1/0 encountered
I've been trying to code a kinetic monte carlo simulation for a dimerization reaction, 2M ---> D. However I have a kinetic Monte Carlo code for a first order decomposition reaction of AIBN (that's ...
4
votes
2
answers
300
views
Find the best fit with some conditions
I have this code to find the best values for $l$, $s$ and $j$:
...
8
votes
2
answers
342
views
Two-dimensional Laplacian coupled with another equation leading to a BVP with integral bc(s)
I have the two-dimensional Laplacian $(\nabla^2 T(x,y)=0)$ coupled with another equation. The Laplacian is defined over $x\in[0,L], y\in[0,l]$. On manipulating the second equation (which I have ...
1
vote
2
answers
168
views
FindFit problem, some models work -- and some do not
I asked this question. Answers and comments were appreciated.
But (some) of the comments did not make satisfied. [Maybe due to my bad English I did not describe my problem very well].
Let me try ...
1
vote
3
answers
187
views
FindFit, FindFormula, Fit, NonlinearModelFit - Which one to use? (I got no good curves & plots)
See this code, what mistake I did? (I got no plot)
...
0
votes
1
answer
40
views
Having trouble with NDSolve [closed]
I'm trying to plot the solutions to the following set of differential equations,
I'm doing this through NDSolve with the following code,
...
2
votes
1
answer
95
views
FindFit low speed when fitting polynomial coefficients: is it possible to significantly increase the speed?
I work in Mathematica with a Butterworth filter, the transfer function of which depends on the selected order and cutoff frequency.
I want to evaluate the change in the location of the roots on the ...
2
votes
1
answer
144
views
How to model the movement of a mass over a dome?
I'm trying to replicate the graphs and animation found in this page that studies the movement of a mass over a dome solving numerically the differential equation ...
4
votes
1
answer
92
views
Trying to recreate a plot which tracks the age of individuals inside a compartment model
I am using a compartment model from this paper.
I am trying to recreate Figure 6. I will be honest, I have no clue how to approach this. The paper doesn't give information on how to achieve the ...
2
votes
1
answer
382
views
Find best equation for data and the area under curve
How can I find the best formula that describe the following Figure and also find the area under the curve (the numerical value):
The data for the figure can be found here:
https://pastebin.com/...
1
vote
1
answer
106
views
How can I get a plot of "surface area coverage" of a parametric plot?
I have a parametric function defined by the x and y functions:
...
0
votes
0
answers
85
views
Why do I keep getting these error messages?
I am trying to fit a parametric differential equation system to the data of the infection cases in Hungary. I keep getting the error messages:
ParametricNDSolveValue::ndcf: Repeated convergence ...
3
votes
0
answers
89
views
Simple neural network with feedbacks in state-space form
Having studied more or less in detail the mechanisms of working with the state-space that Mathematica provides us with, I asked myself: can these tools be applied to neural networks?
This article ...
5
votes
1
answer
250
views
Conditional Random Walk
I am attempting to model a physical process I'm observing in the lab with a random walk generator. I need to find a way to impose a condition such that when the random walk runs into a point in the ...
0
votes
0
answers
111
views
Count data fitting with Nonhomogeneous Poisson process
Following is count data needed to model with a nonhomogeneous Poisson process (NHPP).
For each row-wise e.g. 8:15-8:30, every 12 intervals of 15 minutes size and 15 days of data collected. I have ...
1
vote
1
answer
99
views
Changing a parameter by specific time in NDSolve in a COVID-19 spread simulation
I'm trying to create a mathematical model for COVID-19, to help my city, using the follow system of equations:
...
-4
votes
1
answer
192
views
3D Plotting and optimising on the surface area of a spherical gyroid [closed]
*this is an equation of a shperical gyroid emphasized texti want to plot it in mathematica and obtain the shapes like those on the picture below. sinxcosy + sinycosz + sinzcosx = 0
i also want to know ...
3
votes
1
answer
112
views
How to turn a collection of contour lines into a printable object (mesh, etc)?
Inspired by Henry Segerman's developing fractal curves, I decided to try to convince Mathematica to do something similar. The inspiration for cf, f, and g below came from
How to make this Dragon Curve?...
2
votes
0
answers
62
views
Export and Printout3D missing pieces in STL file
I'm experiencing some strange behavior when using Export and Printout3D on the entire object created below. Exporting each part individually or using Printout3D work just fine. Also, for some reason ...
0
votes
0
answers
1k
views
Help with "Coordinate should be a pair of numbers, or a Scaled or Offset form."
I am plotting the pair of recurrence relations:
...
3
votes
2
answers
465
views
Lagrangian of three-mass system with Mathematica
Before proceeding to calculations in Mathematica, I would like to clarify with knowledgeable people.
There is an ordinary linear three-mass system.
If we write its Lagrangian, we get the following ...
2
votes
1
answer
111
views
Plotting fibre direction at each node
I was wondering if there was a way to plot the direction vector of a fibre family at each node in AceGen/AceFem? Below is an example of exactly what I want to do but I do not know how to recreate it.
...
1
vote
1
answer
306
views
Logistic fit of data
I would like to use LogitModelFit to find the logistic function to my data.
The error I obtain is
LogitModelFit::binrsp: The response values are expected to be ...
0
votes
0
answers
178
views
Recommended model for hysteresis
I have a fabric-based strain sensor and would like to find out what other recommended models can be used in the hysteresis modelling.
I have tried using the cubic function for loading and unloading ...
5
votes
1
answer
752
views
Mathematica code for bifurcation diagram in 3D
Good day. I need help with the code in mathematica to plot the bifurcation diagram (e vs z*) or (e vs x*), for the system ...
1
vote
1
answer
137
views
Combining fitted parameters to make a variable and telling me the error in it
I've fit my set of data to a function of the form: $a*\cos(2\pi t)+b*\sin(2\pi t)+c*\cos(4\pi t)+d*\sin(4\pi t)+e$ with a nonlinear model fit. The parameters $a,b,c,d,e$ have errors in it that ...
2
votes
1
answer
221
views
Why doesn't Mathematica completely draw the fit?
I have a question, and I really need your help, because I think I'm not understanding the reason...
I have a potential model..
F[x_] := k x^n
for the next ...
3
votes
1
answer
151
views
How to create model for classification using SVM methods?
I have a matrix for diseases associated to their symptoms, the columns represent symptoms each row is a disease. the labels 1 and 0 in the matrix data sets represent when a disease i related to ...
3
votes
3
answers
206
views
PIDTune and characteristic equation of zero
I have a BLDC electric motor, I'm currently trying to control via a PIDTune. This is mostly an attempt to reduce (remove) a small run away drift that ends up ...
8
votes
1
answer
504
views
Fitting multiple data with model and NDSolve with different initial conditions, and other shared parameters
I know that there are already questions about fitting multiple datasets and about NDSolve and about shared and non shared parameters, but I tried to apply them and some things are still not clear.
...
1
vote
1
answer
565
views
Estimating parameters on system of differential equations
I am looking for some help estimating the parameters of a series of differential equations to assist fitting the experimental data I have collected.
The Problem:
The equations are based off of the ...
1
vote
1
answer
98
views
Speeding up the calculations by Reduce and NSolve
I have a non-linear system of equations with numeric parameter values as shown below. I first tried FindRoot with given initial values and it did not converge. Then ...
3
votes
0
answers
266
views
Physics based predictive model using Predict
Summary:
The first order response of a block of metal quenching in a fluid (or a cold block heating in a warm environment) is well known. I am trying to create a physics based predictive model for ...
2
votes
1
answer
153
views
Fitting data with 3 linear fits
I have a dataset that can be easily approximated by a piecewise function composing of 3 linear functions, but i am unable to get an accurate fit once the third linear function is required. The model ...
3
votes
2
answers
437
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 ...
0
votes
1
answer
126
views
Fit data with a given function depending on parameters
I want to fit the data of a star's temperature with a function from a model. That function depend on several parameters. I want to know how can I find the value of those parameters.
The data is:
<...
0
votes
1
answer
398
views
Model fitting for concave curve: test if asymptote or convergence exist
I am asking a double check if conceptually I set up proper model and proceeding in good direction to drive conclusions.
I have a distribution that looks like this:
I want to test if for increasing x ...
15
votes
1
answer
2k
views
Speed up NDSolve compared to Python (calls to LSODA)
I migrated a numerical model code from Python to Mathematica and am surprised how much faster the Python version runs. Profiling of the Python version tells me that it is about 100 times faster (120 ...
2
votes
3
answers
199
views
Fitting two equations to diferent parts of the same dataset
I have a system that transit between two different states. Each state output varies linearly with time, given by $m t+c$, where both lines intersect the $x$ axis in the same point. The output of this ...
0
votes
1
answer
79
views
Finding the limit of a function
I have the following code:
...
1
vote
1
answer
91
views
Infinite potential, prevent value to go beyond zero, initial value problem
How do you make a wall potential in Mathematica. Meaning : I want my potential to have a wall at 0 :
$ U(x)=\left\{ \begin{split} & x>0 : U(x) = f(x)\\ &x=0: U(x)=U_0 \\ & x<0: U(x)=...
1
vote
1
answer
283
views
How to plot a trajectory of Lorenz attractor system model (SystemModelSimulate - v11.3)
I'm using one of the system models provided with Mathematica 11.3. (I found it by evaluating SystemModelExamples[].)
...
0
votes
2
answers
120
views
Difficulties in compiling the steady state of a biological model
I am modeling the yellow fever for an EDO system, in which I have to find the stationary states of the system, and I have great difficulty in finding something that can be very simple. I put the ...
42
votes
1
answer
1k
views
In what way can M11.3's system modelling features be used by those who don't have SystemModeler?
Mathematica 11.3 includes some functionality from SystemModeler, but not the full SystemModeler environment.
I assume that most people here are familiar with Mathematica, but not SystemModeler, or ...
0
votes
2
answers
1k
views
How can I fit a differential equation to experimental data?
I would like to add a fit to the following data. Here is the differential equation I am using. g=9.81 l=0.2 m=0.09
...
9
votes
1
answer
637
views
Can I use a differential equation as a model to make a fit to experimental data?
I've done an experiment where I swung a pendulum under air resistance. Is it possible to model the data using the following differential equation and find a b-value?
...