Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [numerical-modelling]

The tag has no usage guidance.

1
vote
1answer
68 views

Multi-steps method for Navier-stokes equations with strongly nonlinear diffusion

I am trying to solve a particular form of the Euler / Navier-Stokes equations in 1D, with very strong and non-linear diffusion coefficients. My system of equations is \begin{cases} \...
1
vote
0answers
106 views

Integrating direct dynamics form more than 1 second does not give back the correct result

I am trying to simulate a robot manipulator dynamics in SciLab. Basically, I generated a step function that has constant acceleration for half of the time and then the same acceleration but negative ...
1
vote
0answers
73 views

Evaluating 3D surface integral over an unstructured surface

I want to evaluate this integral numerically over an unstructured set of points in three-dimensional space: $$\int_{\Gamma} \mathbf{u}(\mathbf{r}) \cdot \hat{\mathbf{n}} d \gamma$$ Where $\Gamma$ is ...
0
votes
0answers
11 views

Exotic stats problem mode fuzzy clusters python

EXOTIC STATS PROBLEM ; MODE, FUZZY CLUSTERS, ETC Hi I'm working on a math problem and not sure how to approach it. Trying to enumerate, rank and extract most common numeric ranges from a list, with ...
3
votes
1answer
74 views

Solving for a set of coupled ODEs to get correct variable values

My question is about how I can solve a coupled system of ODE's, and print out the variables in a plot. I am solving for an q value and an e value, seen in this set of coupled ODE's below: $$ \begin{...
1
vote
0answers
72 views

Comparison between FEM and FDM methods for flow simulations

What are the main differences between finite element and finite difference approach for incompressible flow simulations? I have a vague idea about how FE methods rely on minimizing the residual over ...
1
vote
2answers
50 views

Operator splitting for 4 subproblems

Typically an ODE System which involves 2 different physical problems such as diffusion and advection can be numerically approached by the well known Strang operator splitting scheme. I'm wondering if ...
1
vote
0answers
35 views

Limit to volume change in a discretized mathematical model?

I have set up a mathematical model describing the diffusion of ozone out of a gas bubble. The bubble is surrounded by a thin gas film. So actually, the model describes the diffusion of ozone through ...
1
vote
2answers
491 views

How does one calculate reaction force in FEA?

I wrote a UEL (User Element in Abaqus) for one element and compared to a reference UEL which used standard FEM, where the results agreed satisfactorily, except the reaction force. The stress, strain, ...
2
votes
1answer
99 views

Non-linear flux interface condition - variational formulation

Context: I am working on implementing this paper and I am struggling to come up with a variational formulation for the Butler-Volmer interface conditions. To simplify my question I consider the ...
0
votes
0answers
22 views

The Multiple Streamtube method for VAWTs in 3D

There are many numerical methods applied to determine the performances of a vertical axis wind turbine (VAWT). One method, that belongs to momentum based models, is called the MST model (Multiple ...
2
votes
1answer
77 views

Calculation of the EFIE integral

I need help computing the following integral: $$ \int_{}\frac{(1+jk|\vec{r}-\vec{r}^\prime|)e^{-jk|\vec{r}-\vec{r}^\prime|}}{|\vec{r}-\vec{r}^\prime|}d\vec{r}^\prime $$ in this integral $\vec{r}$ ...
0
votes
2answers
318 views

Physics Simulation in C++

OK, I know a bit of C++ (very basic syntax), and I want to do physics simulation in C++, like stuff like (also the things mentioned here): Ripples and waves over a 2-d surface Vibrating string/...
1
vote
0answers
59 views

Rotational kinematics problem @ $\theta = 0$

I'm simulating a magnetic dipole that is subjected to an evolving magnetic field. In ISO convention ($\theta$ is the polar angle and $\phi$ is the azimuthal angle), my equation of motion that is ...
0
votes
1answer
98 views

Non-linearities in modal analysis of flexible beam

I'm trying to analyse the behaviour of a wind turbine blade rigidly connected to a wall during fatigue testing, being excited in it's first mode in two orthogaonal directions simultaneously (the first ...
5
votes
1answer
84 views

Finite-volume method applied to a particular advection equation

I'm trying to apply the finite-volume method (FVM), with which I'm not so familiar, so a simple 1D PDE equation. I already asked this question in the math stackexchange, but was told that it could be ...
0
votes
0answers
108 views

Couple system of PDEs using MATLAB pdepe

I would like to use Matlab's pdepe to solve this system with cubic sources: $ s_t =(sr)_x + s_{ xx }+s(s-1)(1-s) $ $ r_t =(\frac{ A }{ B }r^2+s)_x + \frac{ A }{ -K }r_{ xx } $ where A, B and ...
0
votes
1answer
95 views

PDEPE nonlinear

I would like to use Matlab's pdepe to solve this system: $$ s_t =(sr)_x + s_{ xx } \\ r_t =(\frac{ A }{ B }r^2+s)_x + \frac{ A }{ -K } r_{ xx } $$ where $A$, $B$ ...
1
vote
0answers
20 views

Uniform distribution in 3D space [duplicate]

Posted this at math stack exchange as well, but alas no replies! So, I have been trying to find ways of distributing particles of spherical or other shape in 3D space, e.g. rectangular space. Random() ...
1
vote
1answer
95 views

Bulirsch-Stoer algorithm to solve simple chemistry. Spanning long time intervals after stationarity

Hi all and thank you in advance. I am working on a time-dependent transport-chemistry model to study the composition of planetary atmospheres. The equations are the following $$\frac{\partial n(z,t)}...
0
votes
1answer
249 views

Is the exponential function, e^x, very expensive to compute in Matlab and harmful to my computer?

Is the exponential function problematic and very expensive to compute in Matlab? When I write a new term for my model of ODEs that has an exponential term in it, the program almost never finishes ...
2
votes
0answers
35 views

One dimensional differential equation with resonance recombination (RHS)

I am trying to solve the following equation: $$\dfrac{\partial }{\partial \epsilon}\left[B\left(\epsilon\right)f_e\left(1-f_e\right)+D\left(\epsilon\right)\dfrac{\partial f_e}{\partial \epsilon}\...
7
votes
4answers
185 views

In Matlab, how can I be consistent with units?

I am modeling some aerodynamics equations and am using meters / centimeters, kilograms, and seconds. I've heard that, "matlab doesn't know units". So, how can I make sure that it does? Just ...
0
votes
0answers
47 views

Detecting stability in solutions to coupled nonlinear equations in aerodynamics,

I'm studying a quasi-steady force model (published in a fluid dynamics journal) that consists of coupled, nonlinear ODEs that describe unsteady aerodynamics -- recently, my advisor and I have found ...
0
votes
0answers
80 views

1D-Diffusion + chemical reactions: non-inear PDE-System with variable coefficients

I'm modeling a process which involves heat diffusion in 1D as well as different chemical reactions modifying the temperature. The system of PDEs looks something like this: $ \partial T/\partial t=-A\...
1
vote
2answers
91 views

Rule of thumb for time-step for solving Maxwell's Equation using 3D-FDTD?

Is there something like a rule of thumb for an adequate time-step size when solving Maxwell's equation for the interaction of light with matter? I guess a single wave oscillation has to be resolved ...
3
votes
1answer
301 views

Scaling/nondimensionalization for numerical optimization

I have a numerical optimization problem that I am trying to scale appropriately, in order to allow for the solver to achieve faster and more accurate results. I found a paper here that had a short ...
0
votes
3answers
131 views

How to determine a PDE which is structure-preserving (energy, mass conserved)?

How to determine if a PDE is structure-preserving (energy,mass conserved)? Are there some standards in judging the preserving-structure? Or rather, how to derive the formulation of energy-preserved ...
1
vote
0answers
46 views

Fit constant term in LM algorithm

I'm using the Levenberg-Marquardt algorithm to fit my data with a Gaussian function: $$ f(x)=a\cdot e^{-\frac{(x-c)^2}{2\sigma^2}}+f_0 $$ $a$, $c$, $\sigma$ and $f_0$ are the fitting parameters. The ...
3
votes
1answer
140 views

Reasons to choose LES in stead of RANS models? (turbulence)

In oceanography, is there any particular reason why choosing large eddy simulations in stead of RANS (regardless of the type of flow)? In both cases, 2d simulations would be used (shallow water model)....
1
vote
0answers
109 views

Strange solutions using Finite Element Analysis

I've implemented the Finite Element Method to model the heat transfer between two different materials where one material is surrounded by the other. When I run the model I'm getting some strange ...
0
votes
2answers
124 views

If a numerical solution remains constant for different grid sizes, what does it mean?

I'm testing a finite volume scheme, Godunov type solver, using a problem with analytical solution. I'm not able to reproduce the solution, which includes source terms. I tried with different mesh ...
0
votes
1answer
295 views

How to construct an ellipsoid using Ansys design modeller (or any other 3D CAD software) [closed]

I am working on numerical simulation of breast model to evaluate the use of thermal imaging for breast cancer detection. To do this I need to construct an ellipsoid rotated 30 degrees around y-axis ...
8
votes
1answer
340 views

Discrete wave simulation - absorbing boundaries?

I wrote a simple 2D wave simulation using the following equations: $$\frac{\partial^2 u}{\partial t^2}=c^2\nabla^2u$$ Where $\nabla^2$ is the discrete laplace operator using a Von Neumann neighborhood ...
1
vote
1answer
87 views

If I discretize a PDE in space with WENO and in time with an implicit method, do I need to solve a nonlinear algebraic system at each time step?

I am attempting to solve a nonlinear advection diffusion equation $$\frac{\partial u}{\partial t} = \frac{\partial}{\partial x}(\frac{\partial u}{\partial x} + u^2)$$ with Robin boundary conditions ...
7
votes
0answers
110 views

Good numerical method for solving the Kadomtsev Petviashvili equations. Is there an analytical solution?

I need to solve the Kadomtsev Petviashvili (KP) equations $$\partial_x(\partial_t u+u \partial_x u+\epsilon^2\partial_{xxx}u)+\lambda\partial_{yy}u=0 $$ where $$\lambda=\pm 1 \;.$$ My questions ...
4
votes
1answer
391 views

1-D incompressible unsteady Couette Flow Explicit finite differece CFD

I am currently following J.Anderson Jr.'s CFD with basic application and I came into some troubles while coding for my very first CFD problem. As the title suggests I am solving an incompressible ...
1
vote
1answer
77 views

Declare variable to substitute one calculate only once

Frame of the question I am currently editing an add-on module to an ocean/circulation model, which is written in Fortran. The code of the main model is quite optimized with respect to short run time (...
10
votes
1answer
337 views

CFL condition in Discontinuous Galerkin schemes

I have implemented an ADER-Discontinuous Galerkin scheme for the resolution of linear systems of conservation laws of the type of $\partial_t U + A \partial_x U + B \partial_y U=0 $ and observed that ...
2
votes
1answer
132 views

Chattering effect using ode23s — SDOF with variable spring and periodic input force

I am attempting to model the following SDOF system with a variable spring and having a sinusoidal input, $$m\ddot{x}+(k_0+k_1)x = m(2\pi f)^2\sin(2\pi ft)$$ where $m$ is the mass, $k_0$ the original ...
1
vote
0answers
55 views

elliptic equation with exponential coefficient

I'm trying to solve the following equation $$\dfrac{\partial}{\partial x}\left(e^{au}\dfrac{\partial u}{\partial x}\right) = 0$$ Of course, this equation can be solved analytically. I am trying to ...
1
vote
0answers
108 views

Stability of the explicit MacCormack Scheme to solve the Navier Stokes equations with Wilcox's K-Omega Turbulence Model

I am solving turbulent pipe flow with an explicit MacCormack scheme and Wilcox k-omega model. The laminar version of the code had three distinct stability criteria which worked fine after ...
3
votes
1answer
154 views

Runge Kutta solution blows up for a first order ODE with very large coefficients

I am solving a first-order ODE: $\frac{\partial \rho }{\partial t} = -a \rho^2 + b |A(t)|^2 \rho +c|A(t)|^{2m}$ This is the evolution of the plasma density in the presence of a laser pulse (complex ...
1
vote
0answers
87 views

Preventing numerical oscillations with Cash-Karp method

I am implementing an ODE solver using the Cash-Karp method on equations with the following form: $$ \frac {d E}{d z} = - \frac {1}{\mu_0c} \frac {d ^2 E}{d z^2} + \frac {i}{\mu_0c}E \tag{1} $$ And ...
1
vote
0answers
71 views

What is a good algorithm to solve a discrete continuity equation in Cylindrical coordinates?

The equation is: $\partial f/\partial t + \nabla \cdot (v f) = 0$ $, \;\; f \in [0,1] $ and $v$ is a velocity known at every grid cell. A more precise constraint is that $f$ is either 0 or 1 but ...
3
votes
1answer
194 views

How numerical diffusion is related to advection term?

I have crude idea that numerical diffusion arises while using upwind scheme and causes solution to deviate from its original one. But I am unable to understand how numerical diffusion phenomenon is (...
1
vote
1answer
94 views

How to discretize the surface of a prolate spheroid?

I need to discretize the surface of prolate spheroid given by the equation $$\frac{x^2}{L^2} + \frac{y^2}{D^2} + \frac{z^2}{D^2} = \frac{1}{4}$$ The surface has to be divided to 500 equal panels to ...
0
votes
1answer
232 views

Difficult bug in my 2D Compressible Euler solver

For the past few days I have been writing a numerical solver for the 2D compressible Euler equations for an ideal gas. My numerical method has been the Local Lax Friedrichs or "Rusanov's method." ...
1
vote
1answer
140 views

3-dimensional plotting with nonuniform grids

I have 3 variables I am considering: time (t), 1-dimensional space (x), and intensity (I). I would like to plot the intensity in the z-axis as a function of t and x (the latter two variables would ...
3
votes
1answer
63 views

Can singularity screw up your model?

I've been running some complicated Finite Element Models. In most cases, the stress repartition seemed to be absolutely correct. However, on several point (complicated geometry), it appears that ...