All Questions

8,452 questions
Filter by
Sorted by
Tagged with
146 views

Why wall shear stress calculated from LBM directly and the one calculated based on velocity profile are so different in some cases?

First of all, I hope you accept my apologizes if my question seems off topic here. But, I asked this question in ParaView forum and after a week still I did not receive any response yet, so I'm ...
67 views

Calculate Transformation Matrix between two sensors

My question is if I can calculate the transformation matrix between two sensors. Each sensor provides a $4\times 4$ matrix for every timestep recorded. The sensors are moving and have some noise in ...
58 views

FEniCS, refinement not 'respecting' domain boundary

Short question: how to ensure that extra points are not included as 'boundary' points after calling the refine function. More details. I am working with a hexahedral mesh in $3$d. Let $X$ be the set ...
57 views

Can the standard multigrid performance be used for time-dependent PDEs?

Consider a time dependent pde(i.e u(x,t)).I know when only space-coarsening is used the standard multigrid performance can be applied but what if instead we use only time-coarsening?Can we apply the ...
78 views

I am new in Domain Decomposition method. I am started to solve $-\Delta u = f$ in $\Omega$ and $u = 0$ on $\partial\Omega$. From that I get in $\Omega _1$ $$\begin{bmatrix}4&-1\\-1&4\end{... 1answer 44 views Matrix multiplication not working in Scilab I entered an instruction to calculate the coordinates of a vector after a change of basis in order to repeat it many times with various vectors. X0=[1;1/2] is a ... 2answers 92 views Chebyshev differentiation via FFT with a domain [a,b] I want to ask something about Chebyshev differentiation via FFT, which can be used to obtain with spectral accuracy the derivative of a smooth function. See for instance this code in python, which ... 1answer 53 views Is it possible to resample grid in such a way so that continuous objects remain continuous? Suppose I rasterize a rectangle of width 2.5 gridpoints and get the values as shown: =============== | 0 | 1 | 1 | 0.5 | 0 | Now I resample that ... 1answer 107 views Numerical integration in 2D I would like to solve the following problem$$ \vec{v}(x,y)= k\, \nabla \theta(x,y) $$with respect to the unknown function \theta. Parameter k is just a real constant quantity. I have two ... 1answer 49 views Partially Banded Matrix I have a somewhat peculiar Jx=R system that I need to solve. The matrix J is 2N -by- 2N. The first N rows have all entries filled. The next N rows are banded in two places, i.e. for the (N+k)th row, ... 2answers 68 views Can a direct method like Thomas be used in a multigrid method as a smoother? As far as I know, multigrid uses stationary iterative methods as smoothers (i.e GS), but can we use a direct method also? For example, in case we have a tridiagonal system (for example 1D heat ... 1answer 57 views Method to calculate solution of a linear equation system? I am searching a solution method for the following equation system of equation systems: Let A, B \in \mathbb{R}^{n \times n} be s.p.d. Matrices and O be the zero matrix of the same size. Further ... 0answers 35 views Why does the matlab command **chol(A)** slower than **chol(A,'lower')** for a large sparse SPD matrix? For a SPD matrix A, there exists Cholesky factorization A=LL^T or A=R^TR, where L, R are a lower and upper triangular matrix, respectively. Also in matlab, there has a command R = chol(A) which ... 1answer 91 views Solve linear system with Newton-Raphson method Is it possible to solve a linear matrix system A x = b using the Newton-Raphson method? If yes, how can this be done? More special, how is the derivative build? 1answer 69 views How to record hardware and software info in Julia? Watermark extension for Jupyter shows system and package information for reproducibility: ... 1answer 93 views Step size and stability of Euler forward method I'm trying to calculate the maximum step size that provides stability for the following nonlinear IVP using the Euler forward method: u'(t) = -200tu(t)^2,\qquad u_0 = 1, \qquad t\in [0,3], with ... 3answers 369 views Does a symmetric positive definite matrix also have \mathbf{A} = \mathbf{L}^T\mathbf{L} (where \mathbf{L} is a lower triangular matrix)? As we know, for a symmetric positive definite (SPD) matrix \mathbf{A}, there is a theorem about the Cholesky factorization \mathbf{A}= \mathbf{L}\mathbf{L}^T, where \mathbf{L} is a lower ... 1answer 99 views Simulating advection - diffusion problem in a network of 1D pipe I'm interested in solving the following advection-diffusion system in a 1D network of pipes.$$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$... 2answers 51 views What's the difference between the 2 ways of definitions of function handle? which is robust and better? Recently, I have been studying Krylov subspace iterative methods. I find the matlab robust command pcg and the new concept of the function handle to return a matrix-vector product. Then I use help pcg ... 0answers 60 views Lax-wendroff for stiff source terms I am interested in problems of the form$$ u_t = F(u) + S(u) where F(u) = - div(f(u)) and S(u) is a stiff source term. I am looking for any existing works which develop Lax-Wendroff type ... 0answers 66 views What is appropriate boundary condition for Poisson pressure equation? I'm doing CFD simulations in unstructured grids. Well, it's a bit different from conventional unstructured grids that are used mainly in FEM or FVM as tetrahedral meshes. Mine is a voxelized mesh of ... 3answers 117 views How the gmres method iteration behaves for this **enfant terrible** matrix? Recently, I have been studied my lessons about gmres iteration, probably the most popular iteration method for general large sparse linear system of equations Ax=b. And the convergence is obtained ... 2answers 72 views How can I calculate the exponential integral? (I originally asked this in a different exchange.) I'm writing a program that uses the prime-counting function. Right now, I'm using x/log(x), but I want to ... 0answers 37 views Solving a system of PDEs with no-flux boundary conditions (finite difference discretization) I am interested in solving a system of linear PDEs with the finite difference method and I'm having trouble to solve the no-flux boundary condition correctly. \begin{align} \frac{\partial n}{\partial ... 0answers 21 views Speedup of CPU Pipelining by number of steps [closed] When a CPU has K steps the speed up of using pipelining compared to non-pipelining is K. But what I want to know is, say I am a CPU designer and want to decide whether I should build K or N ... 1answer 50 views How can I determine if there is a closed-loop path in a graph? Assuming I have a computer representation of a graph presented in the figure below: How can I find out whether there are some close-loops inside the graph, like the one marked in red (or more ... 1answer 43 views Can we use interpolation function of different order to represent different degrees of freedom in a FEM element? Consider a line element in FEM. Let each node have 3 DOF. They are x and y translation DOF and temperature. Can we use interpolation functions of different orders for the translation DOFs and ... 1answer 86 views How to compute all the eigenvalues of a large sparse matrix using matlab? In matlab, there are 2 commands named "eig" for full matrices and "eigs" for sparse matrices to compute eigenvalues of a matrix. And eig(A) computes all the eigenvalues of a full matrix and eigs(A) ... 1answer 70 views Recursive Algorithm to Calculate Determinant via Expansion of Minors in C# I have been recently trying to attempt to write an algorithm in C# that would calculate the determinant of a matrix via recursion using the expansion of minors method. I understand that there are ... 0answers 133 views Symmetric sparse direct solvers in scipy scipy.linalg.solve, in its newer versions, has a parameter assume_a that can be used to specify that the matrix A is symmetric ... 0answers 39 views What is Voronoi particle tracking? I've been trying to track this down, but google is giving paywall papers that don't appear to be directly related to computational science, or simply don't explain the source algorithm. There's an ... 0answers 21 views Direct and Inverse efficient mapping of 3D cartesian positions in a 1D array I saved a sample of N Cartesian locations \{x_i, y_j, z_k\} inside a one-dimensional array \mathbf{a} = \{a_l\}_{l = 1}^N. How can I access back (efficiently) the l-location of the array \... 1answer 92 views Are there any commercial CFD codes that implement a Discontinuous Galerkin scheme? I've been reading about the Discontinuous Galerkin discretization scheme and it's application to CFD for fluid flow. It seems to be a promising method for simulating turbulent flows, by using higher-... 1answer 188 views Understanding butcher tableau when it comes to implicit methods I've been learning about butcher tables and am having some difficulty understanding how to translate them when it comes to implicit methods. Specifically, I'm looking at backwards Euler: \begin{array}... 0answers 156 views What exactly is the cause(s) of blow-up for too-large step size in a method like RK4? I have been working on creating a few home-made numerical methods, and I am using them to visualize text-book problems from my Strogatz dynamics textbook. It feels like a good way to learn numerical ... 1answer 33 views Accelerating Conjugate Gradients fitting for small localized kernel (like cubic B-spline) Question: Is there some pre-conditioner for Conjugate-Gradient (CG) cheap enough, that it is worth using even if my operator is very local (i.e. already has a low number of non-zero elements), as it ... 0answers 17 views Offline Parameter Estimation for second order system - Ordinary Least Squares I have a second order system which is described by the following differential equation: \ \ddot{y}+α_{1}*\dot{y}=b_{0}*u  where \ y  is the output of the system and \ u  is the input of the ... 0answers 42 views Imposing decaying boundary conditions on a non linear ode I am trying to solve a^{2}y''=y+y^3 numerically. This equation models a potential and goes to \infty  for x\to0 hence I get the singularity to be of order \frac{1}{x} by keeping only the y^{3} ... 0answers 13 views Solving SDEs in R until a prespecified value is reached I am trying to solve a system of SDEs in R using the Diffeqr package. A simplified version of the system: ... 0answers 18 views Normalising DFTs Correctly I have been playing around with convolutions in scipy's signal package: ... 0answers 19 views Efficient Alternatives to Operator Splitting in NLSE Lately i've been trying to decide my thesis theme and i've become interested in adaptive finite elements and finite volumes algorithms. However, I need my thesis to fit into a physics related theme. ... 1answer 117 views How to perform an eigendecomposition of a general complex matrix with arbitrary precision in C/C++ I need to obtain the Eigenvectors of a general complex matrix, but with quadruple precision. Is anyone aware of a means to do this? I currently use Tux Eigen, and I see that in their unsupported ... 0answers 16 views How to handle system of chemical reactions for a batch reactor SciPy solver I have a system of chemical reactions where the rate equations represent a batch reactor model. The model is a system of ODEs which is solved with the SciPy ... 0answers 71 views Probability approximation: monte carlo VS sde I have a probability measure \mu (say, in \mathbb{R}^{d}, with density) and I want to approximate it numerically. Today I noticed that my measure is ergotic for a certain Stochastic Differential ... 1answer 72 views What is the format of saving sparse matrix in MATLAB? We know that for lagre sparse matrices, we can use compressed sparse row (CSR) or compressed sparse column (CSC) format to store the sparse matrices so that we can save CPU memory. And the coordinate ... 0answers 46 views Hybrid Ellpack-Itpack (ELL) + COO Sparse Matrix Representation decomposition threshold Hybrid ELL-COO sparse matrix representation can be done as in the picture, I was looking intensively, however I couldn't find out what is the threshold of decomposing the original matrix into ELL part ... 0answers 24 views Interpreting results of using no-flux boundary condition I am solving for solute transport in 1 D.\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$No-flux boundary condition is imposed at both the ... 1answer 112 views How to use matlab command 'fft' to solve Ax=b arising from Poisson equation? I want to ask a question about fast solver to the Poisson equation with Homogenous boundary conditions as follows:$$-\Delta u = f. After centered difference using $n+2$ equidistance points in all ...
I am in a situation where as part of a sort of inverse power method scheme, I want to very often perform the following step: Apply a symmetric rank one update $uu^\top$ to my inverse matrix $A^{-1}$ ...