All Questions

0
votes
0answers
4 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 ...
2
votes
1answer
27 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 ...
0
votes
1answer
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?
1
vote
0answers
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 ...
0
votes
0answers
17 views

Sum of Inverse of Variables constraint in an optimization problem

I have the following optimization problem: $$\min_{ST_i} \sum_{i=0}^{|\Gamma|-1} \frac{S T_{i}}{T_i} \times \zeta_{i} \\ \text{s.t.} \sum_{i=0}^{|\Gamma|-1} \frac{S C_{i}}{S T_{i}}<=uBound,\quad ...
0
votes
0answers
10 views

An algorithm for matching pairs of numbers from two sets [migrated]

I need a push in the right direction in coming up with an algorithm for matching sets of numbers (actually dates). I have two lists (A & B) of integers e.g. A: [2, 4, 9, 15, 16, 20] B: [3, 7, 9, ...
0
votes
1answer
16 views

Problems with python's interp 2D

I am writing some functions to interpolate data. While using interp2D, somehow, a sample matrix works but when I change the size of the matrix, it returns an error. ...
-1
votes
0answers
18 views

Why are security properties non-compositional? [on hold]

I took a lecture in the field of safety and security. In one lecture it was said, that security properties are non-compositional. I don't quite get what it means and can't find anything about it in ...
0
votes
0answers
27 views

How to cap and mesh this cylindrical surface?

This question is related to my previous question. I solved the issue in the previous question and now I'm facing another problem about meshing that cylindrical surface shown here. I want to generate ...
1
vote
0answers
41 views

Discretizing a parabolic PDE with finite volume method

I want to discretize the following parabolic PDE: $$u_t = \nabla\cdot(\alpha(x)\nabla u)- \beta u\\ x\in\Omega \subset \mathbb{R}^2\\ \partial_n u = 0\\ u(t,0) = u_0(x)\ge 0, \alpha(x)>0$$ Given ...
0
votes
1answer
24 views

Is open foam Mac version compatible with Linux version

I am recently starting with OpenFoam. I have a Mac as my personal laptop, but I would have to use OpenFoam on linux in my lab. So my questions are: 1) Is the OpenFoam software independent of OS, so ...
1
vote
1answer
48 views

Gaussian Elimination Using Fortran [on hold]

I developed the code below for performing gaussian elimination in order to evaluate the determinant of a matrix: ...
0
votes
0answers
31 views

Non-linear Boundary Value Problem. How to compute the Jacobian?

Consider a Boundary Value Problem: $$ \delta u''+u(u'-1) =0 \Leftrightarrow u''=\frac{-u(u'-1)}{\delta}=:f(t,u',u), \\ u(0)=a, u(1)=b $$ $\delta,a,b$ are known parameters. I want to implement Newton'...
0
votes
0answers
21 views

Possible application of Polya's urn on real data (for Portfolio optimization)

I wanted to find some more information of this topic, but I found very little. I might be interested in optimizing a stock investment portfolio. Maybe I could use beta or some other common risk ...
1
vote
0answers
43 views

Determine truncation error of PDE discretization

The equation is $$\frac{\partial}{\partial x}\left(u\frac{\partial u}{\partial x}\right)=f(x)\\ 0<x<1, u(0)=u(1)=0$$ I'm discretizing this PDE using FVM as follows: $0=x_0=x_{1/2}<x_1<x_{...
0
votes
0answers
25 views

How can I maximise orthonormality between degenerate eigenvectors using ARPACK?

I am using ARPACK's zndrv1 to diagonalise a matrix (the context is quantum chemistry). While all vectors have a norm 1, as expected, vectors corresponding to degenerate eigenstates aren't always ...
1
vote
0answers
22 views

Paring Large Numbers Question

I am writing some simple code to raise a base value to a power then perform some operations on the output. I have included the code I am using now, below ( see end of this message ), also see ...
1
vote
0answers
32 views

Examples of problems that cannot be formulated as optimization problems

An optimization problem has 3 main components: decision variables, constraints and an objective function. Such a problem can be mathematically modelled and solved using an optimization solver. For ...
2
votes
1answer
48 views

Can ARPACK exploit hermiticity when diagonalising a complex matrix?

I have noticed arpack comes with a driver dsdrv1 that exploits symmetry of a real-valued matrix. Is there a way to analogously exploit a Hermitian matrix in some way via z--- drivers? The manual ...
0
votes
0answers
44 views

Matlab simulation: conflicting results

I have implemented a simulation of the model (for $i=1,\ldots,N$ representing nodes of a graph) $$\frac{d\omega_i}{dt} = P_i -\alpha_i \omega_i + K \underset{i \neq j}{\sum_{i=1}^N} \sin(\phi_i - \...
2
votes
1answer
99 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 ...
3
votes
1answer
53 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. ...
0
votes
0answers
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 ...
5
votes
2answers
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-...
0
votes
1answer
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 ...
0
votes
1answer
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. ...
1
vote
1answer
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 ...
8
votes
1answer
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 ...
2
votes
0answers
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(\...
1
vote
1answer
40 views

Product of rank one updates as a low rank update for quasi newton/BFGS

I'm trying to improve the speed of the following iteration to calculate $s_k$: $$B_k^{-1} = \Bigg( I + \frac{s_{k}s_{k-1}^T}{||s_{k-1}||^2}\Bigg)...\Bigg(I+ \frac{s_1s_0^T}{||s_0||^2}\Bigg) B_0^{-1}\\...
0
votes
1answer
50 views

Solve multi-dimensional optimization problem using basinhopping

I am searching for an optimization solution, which is a 8d vector representing 4 complex elements, where each element is within the complex circle with maximal radius 1.2. The objective function is: ...
0
votes
0answers
38 views

Existence and uniquness of solution of FVM for Poisson equation

I'm discretizing the following Poisson equation using FVM where the domain $\Omega$ of the solution is a regular hexagon of side $1$ centered about the origin. $$\Delta u =k,\text{ $k$ constant}\\ \...
3
votes
2answers
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, ...
1
vote
0answers
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 ...
0
votes
1answer
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: ...
3
votes
0answers
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 - ...
0
votes
0answers
81 views

Gaussian Elimination with Fortran 90 [closed]

I am having some issues in implementing this sample code.Calculating the determinant of a matrix: ...
1
vote
0answers
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 ...
0
votes
1answer
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 ...
-1
votes
0answers
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 ...
2
votes
1answer
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. ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
6
votes
1answer
172 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. ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
29 views

Why is this MM_multiplication called numeric quadrature?

Link:https://github.com/romeric/Fastor/blob/master/benchmark/benchmark_backend/benchmark_matmul.cpp In this test, the author calls this benachmark a test similar to numerical quadrature. Why is that, ...
0
votes
0answers
11 views

How to choose metrics for evaluating classification results?

Recently we have developed a python library named PyCM specialized for analyzing multi-class confusion matrices. A parameter recommender system has been added in version 1.9 of this module in order ...

15 30 50 per page