# Questions tagged [modeling]

Questions about approaches for simulating physical systems or phenomena by building from related understanding and basic principles.

194 questions
Filter by
Sorted by
Tagged with
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 ...
• 21
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: ...
• 13
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. ...
• 1,796
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,796
1 vote
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 ...
• 13
300 views

### Find the best fit with some conditions

I have this code to find the best values for $l$, $s$ and $j$: ...
• 1,304
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 ...
• 297
1 vote
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
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) ...
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, ...
• 103
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,344
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 ...
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 ...
• 57
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/...
• 421
1 vote
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: ...
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 ...
• 49
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 ...
• 2,344
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 ...
• 73
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 ...
• 187
1 vote
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: ...
• 131
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 ...
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?...
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 ...
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: ...
• 83
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,344
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
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 ...
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 ...
• 300
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 ...
• 99
1 vote
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 ...
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 ...
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 ...
• 155
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 ...
• 2,921
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,235
1 vote
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
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 ...
• 4,865
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 ...
• 5,301
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 ...
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 ...
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: <...
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 ...
• 445
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 ...
• 7,663
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 ...
• 1,022
79 views

### Finding the limit of a function

I have the following code: ...
• 1,941
1 vote
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,235
1 vote
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[].) ...
• 11.7k
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 ...
• 1
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 ...
• 231k
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 ...
• 135