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
votes
0answers
17 views

Using Modules; creating files and importing ? Please see attached links [on hold]

I am a super n00b beginner, I have been teaching myself python concepts for the last couple of months using juptyer notebook, and lessons in CFD & similar subjects that I am conceptually familiar ...
0
votes
1answer
41 views

Changing the domain of a 3D Finite Difference code from cube to sphere

I have an explicit FD (Finite Difference) code for diffusion/heat on a PDE in a cuboid domain, and it works fine. I would like to update the discretized equations and change the code so as to solve ...
0
votes
1answer
30 views

Given co-ordinates of 8 vertices, how to calculate the outward normal and surface area for each face of a irregular hexahedron?

I am working on an FEA mesh of hexahedron elements. The elemental level calculations involve finding the surface normals and area for each surface of a hex element. I preferred the vector cross ...
2
votes
0answers
60 views

Are there known accuracy issues between 2D axisymmetric and 3D solutions?

In my full 3D solutions I am solving for the potential throughout a $100\times 200\times 200$ grid. Inside is a ring electrode set to -5V via a Dirichlet boundary condition, and surrounded on all ...
0
votes
0answers
22 views

Model transformation of a point cloud based on a differential rule

Suppose I have an arbitrary 3-D point cloud. It can be for instance a regular rectangular mesh, with a fixed average distance between points. Now there is a certain rule to how this point cloud has ...
1
vote
2answers
128 views

Libraries to deal with unstructured grids

I am dealing with a *.cgns file. This mesh format, when saved as an unstructured grid, holds nodes coordinates, nodes connectivity per element and boundary ...
3
votes
2answers
71 views

Computational cost comparison of DNS and SPH

I may be incorrect, but it seems like commercial graphics codes typically use smoothed particle hydrodynamics (SPH) to produce stunning simulations and not continuum based methods. Why is this? Is SPH ...
1
vote
1answer
72 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 ...
4
votes
1answer
108 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
73 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
846 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
106 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
25 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
80 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
450 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
99 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
85 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
123 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
111 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
21 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
102 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
273 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
189 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 ...
1
vote
0answers
50 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
84 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
96 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
308 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
133 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
141 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
111 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
352 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
353 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
89 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
114 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
436 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
78 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
358 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
138 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
112 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
171 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
97 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
76 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 ...