# All Questions

7,609 questions
3 views

### Advection-Diffusion by using Lattice Boltzmann Method, Is it practical for engineering applications?

I want to use lattice Boltzmann method to solve advection-diffusion in three-dimensional space. In fact, my problem is related to drug release in human blood vessels and as a results, I'm interested ...
26 views

### Visualization of 3D streamlines in ParaView

Essentially I want to use paraview to recreate a flow visualization like the one shown in the picture above. I am able to create the 3d flow lines using a pipeline that looks like ...
29 views

### Overrelaxation with w < 0

Are there any circumstances under which using a value $w < 0$ would help us find a solution in over-relaxation faster than we can with the ordinary relaxation method?
8 views

### Translating grid with extrusion speed

I am putting into MATLAB code the equations that describe a plastic extrusion process. From a paper, I found I should use a spatial grid that translates with the extrusion speed, being the reference ...
17 views

98 views

### What does the exponential function mean in numerical ODE solving formulas?

I'm trying to read papers on numerical ODE algorithms and I always seem to stumble upon huge amounts of exponentials multiplied by each other. For example in New families of symplectic splitting ...
52 views

### What is ABA and BAB schemes when talking about numerical integrators

I have read a lot about numerical integrators (ode solvers) lately and tried reading a few papers but I have stumbled upon something that I can't understand and it's something called ABA and BAB. ...
15 views

### Attempting SOR and conjugate gradient with 2D BVP, is there something wrong with the problem? Or will matrix be ill-conditioned?

The goal is to use a Laplace equation to solve: $$a(x,y)(u_{xx} + u_{yy}) = f(x,y)$$ with boundary condition $u=0$ on the boundary $x:[-1,1] , y:[-1,1]$. The problem is that we are supposed to work ...
85 views

### Efficient approach for solving matrix plus diagonal matrix system that varies in time

When solving a system of ODEs, as part of a preconditioner, I get the system $(A + D(t))x = b(t)$ where $A$ is a sparse matrix and $D(t)$ is diagonal. I'm currently solving this by taking the LU-...
78 views

### How to make a less diffusive code to solve 2D advection equation?

I would like to solve the following differential equation numerically in 2D, $$\frac{\partial z^-}{\partial t}+(\vec{B}\cdot\vec{\nabla})z^-=0,$$ see Wikipedia if you are curious about what the ...
55 views

### How to write in paper the equations given by splinefit?

I am trying to write on paper the piecewise polynomials given by the splinefit function, but I am having some problems figuring out what the coefficients should be. ...
61 views

### Assessing numerical error in solving a least squares problem

I have a linear system of the type $$Ax = b$$ I want to minimise $|b - Ax|^2$. I know there are different approaches to directly solve the system (Normal equation + Cholesky, QR decomposition, SVD ...
90 views

### Finding the $i$-th largest eigenvalue of a matrix

Given a large matrix $A$ with eigenvalues $\sigma_1\ge \sigma_2 \ge \dotsc$, I want to determine only a subset of these values, say $\sigma_5,\sigma_8$ and $\sigma_{19}$. Is there an algorithm that ...
29 views

### Solver for generalized eigenvalue problem with multipoint constraints

We have the following generalized eigenvalue (set of) problem(s) $$[K_R(\kappa)]\{u_R\} = \omega^2[M_R(\kappa)]\{u_R\}\quad \forall \kappa \in [\kappa_0, \kappa_1]$$ with \begin{align} &K_R(\...
40 views

78 views

### Optimization techniques for expensive multi-variable functions

I'm working with a finite element model in which I'm interested to minimize the average temperature at a surface. I have 15 independent variables in my model, including geometry, materials, flows, ...
65 views

### Constraining the total volume in Finite Element Methods

I have a diffusion problem which can be broken down to be: $-\Delta u = f(u)$ on $\Omega ~/~ \Omega_{int}$ $u = 1$ on $\Omega_{int}$ Note that this is an internal Dirichlet constraint to the ...
48 views

### Elliptic PDE finite volume method with Dirichlet boundary condition

I want to discretize the following equation using a Finite Volume Method $$\nabla \cdot (a(x)\nabla u)=f(x)\\x\in \Omega \subset \mathbb{R}^2 \\u_{|\partial\Omega}=g$$ I'm using Voronoi cells here: ...
47 views

### MATLAB: Compute the Schwarz-Christoffel transformation symbolically

Suppose we have a conformal mapping from the unit disk in the $\omega$ plane onto the exterior of a polygon in the $z$ plane. The Schwarz-Christoffel mapping in this case is defined as: f(u) = A - ...
81 views

### Gaussian Elimination with Fortran 90 [closed]

I am having some issues in implementing this sample code.Calculating the determinant of a matrix: ...
68 views

### Grid Data Interpolation

What are the most sophisticated methods for interpolating a scalar field say Electric or Magnetic Field on a 3-D grid? I have scalar data on a meshgrid with equal spacing. I would like to use an ...
58 views

### Python sequence cluster exercise

I am working through an exercise in my textbook and implementing the code in Python to practice dynamic programming. I feel like I am right on the edge of figuring it out, but after many hours, I come ...
28 views

### Charged Particles within magnetic fields [closed]

I am trying to code the motion of a charged particle within a magnetic field and produce a 3D trajectory plot. The problem I believe is that I need to fix the axes and limit the animation produced. I ...
43 views

### Linear elasticity modeling load using traction vs. mixed BC

In classical linear elasticity, when modeling a force/load boundary condition, it appears that we could either: Use a pure Neumann boundary condition, where the 3 traction components are specified. ...
17 views

### Implicit finite difference flow across across multiple cells

I am interested in solving a simple equilibration flow on a finite difference grid (i.e., non-uniform initial potentials/heads $p^t$, all boundaries no-flow). It is relatively easy to set up an ...
32 views

### How to subtract two non-closed surfaces from each other in VTK or ParaView?

I'm trying to subtract two surfaces, which are shown below in this image, by using VTK or ParaView. I'm aware of vtkBooleanOperationPolyDataFilter but that filter needs its inputs to be closed ...
26 views

### Does adaptive Gauss-Kronrod reuse function evaluations?

I'm curious to know how QUADPACK's QAG routine works. My understanding is that it begins by calculating on each subinterval the numerical quadrature with a Gaussian-Legendre rule and a nested Kronrod ...
31 views

### Boundary condition causing divergence

I am trying to solve a pressure Poisson equation using BiCGSTAB without preconditioning. When I use Neumann condition at all boundaries the solver converges but if I make one boundary as Dirichlet the ...
171 views

### What are the major differences between GMRES and FOM?

I am reading Professor Saad's "Iterative Methods for Sparse Linear Systems" (2nd edition). The basic algorithm for FOM is given on page 166 and the basic algorithm for GMRES is given on page 172. ...
15 views

### Access PETSc data in totalview?

Is it possible to view the data stored in the various PETSc data types from within totalview? Ordinarily, PETSc types are integers which act as pointers to the actual data (obviously my understanding ...
26 views

### Algorithm to determine flat surfaces and camera orientation without specialized hardware

Modern augmented reality platforms such as Google's ARCore and Apple's ARKit seem to only operate on mobile devices, I'm guessing, because their underlying algorithms require specialized hardware that ...