Questions tagged [modeling]

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

Filter by
Sorted by
Tagged with
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 ...
Zara's user avatar
  • 21
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: ...
Nebula's user avatar
  • 13
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. ...
ABCDEMMM's user avatar
  • 1,796
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 ...
ABCDEMMM's user avatar
  • 1,796
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 ...
Nebula's user avatar
  • 13
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$: ...
Rodrigo's user avatar
  • 1,304
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 ...
Avrana's user avatar
  • 297
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 ...
Hussain-Alqatari's user avatar
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) ...
Hussain-Alqatari's user avatar
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, ...
Anthony P's user avatar
  • 103
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 ...
dtn's user avatar
  • 2,344
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 ...
Edgar Castro's user avatar
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 ...
Luca's user avatar
  • 57
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/...
John's user avatar
  • 421
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: ...
user avatar
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 ...
ibroni's user avatar
  • 49
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 ...
dtn's user avatar
  • 2,344
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 ...
natedice's user avatar
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 ...
step-by-step's user avatar
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: ...
Kamog's user avatar
  • 131
-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 ...
Selamo Basile's user avatar
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?...
ryan.axiom's user avatar
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 ...
ryan.axiom's user avatar
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: ...
Alex's user avatar
  • 83
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 ...
dtn's user avatar
  • 2,344
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. ...
IfIcantdoithomieitcantbedone's user avatar
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 ...
Ксения Цочева's user avatar
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 ...
Boajj04's user avatar
  • 300
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 ...
Patrick's user avatar
  • 99
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 ...
Houndbobsaw's user avatar
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 ...
Chris Schwenke's user avatar
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 ...
Ben Aawf's user avatar
  • 155
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 ...
DrMrstheMonarch's user avatar
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. ...
J.A's user avatar
  • 1,235
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 ...
user3741793's user avatar
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 ...
Tugrul Temel's user avatar
  • 4,865
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 ...
dearN's user avatar
  • 5,301
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 ...
william tepe's user avatar
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 ...
Wahyu Surya Ningrat's user avatar
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: <...
Juan Daniel Torres's user avatar
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 ...
user305883's user avatar
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 ...
Markus Roellig's user avatar
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 ...
BPinto's user avatar
  • 1,022
0 votes
1 answer
79 views

Finding the limit of a function

I have the following code: ...
Jan Eerland's user avatar
  • 1,941
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)=...
J.A's user avatar
  • 1,235
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[].) ...
murray's user avatar
  • 11.7k
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 ...
wgrt's user avatar
  • 1
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 ...
Szabolcs's user avatar
  • 231k
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 ...
fidafa123's user avatar
  • 135
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? ...
fidafa123's user avatar
  • 135