# All Questions

8,072 questions
Filter by
Sorted by
Tagged with
17 views

### Inconsistent potential over a cylindrical surface in COMSOL

I made the following construction in COMSOL (This is a cut): Two cylinders, the inner one in the middle is a solid cylindrical conductor. The thick outer cylindrical shell, along with the two small ...
20 views

### On using Ritz Method to solve a Mindlin–Reissner plate

I am trying to replicate the method given in the this paper. I have written a Matlab program which determines the displacement field of Mindlin–Reissner plate theory using Ritz method. The limitation ...
111 views

### Cholesky for ill-conditioned/singular covariance matrices

Can someone suggest a way to get Cholesky factorization of a singular covariance matrix? I need it to match Cholesky on full-rank matrices, ie coordinate order should be preserved. My attempt below ...
54 views

74 views

### Number of GMRES iterations increase when stepping forward in time, using the Newton method

I am solving a system of nonlinear time-dependent equations using the Newton method in a finite-element-setting, i.e. first I create the jacobian matrix for the current time, and afterwards I try to ...
63 views

### How to implement the following Finite Element method for Burgers' equation?

I am trying to replicate this result. It involves using the Galerkin finite element approach onto the viscous Burgers' equation. However, my implementation (in R) seems to be giving me wrong results....
33 views

### Equivalent of multiple-scale analysis for a linear ODE

I came across the method of multiple-scale analysis and was intrigued, because I am trying to solve a linear ODE with multiple characteristic timescales. When I apply the method as described, say, ...
45 views

32 views

### Grids for atmosphere simulation with finite volumes on the globe

I am currently in the early construction process of building a simple CFD model of a rotating planetary atmosphere. The planet should be allowed to tilt significantly, so that a time-dependent source ...
29 views

### Implementation of Lanczos method that returns tridiagonal matrix

The Lanczos method can be used to obtain extremal eigenpairs of sparse symmetric or hermitian matrices. I know there are several implementations of the Lanczos method (as well as Arnoldi, Davidson, ...
41 views

### Incomplete LU decomposition of sparse matrix

I have a sparse matrix stored in CSR format. For this matrix, I would like to get the incomplete LU decomposition. I tried to find algorithms which can utilize the CSR format but I could not find ...
34 views

### Least square approximation of a polynomial with a constraint on the derivative in Python

I'm trying to fit a polynomial of the third degree through a number of points. This could be a very simple problem when not constraining the derivative. I found some promising solutions using CVXPY to ...
I'm learning and improving my Python skills. I did a program in Python about Mandelung constant. But, I'm having kind of a problem. The Mangelung constant is calculated using this sum: $$V_{total} =... 1answer 26 views ### Can I solve a model in GEKKO with Black Box, Simulated Annealing or GA solvers? I'm trying to use my current GEKKO model with different solvers methodologies. I don't know if I can also use global optimisation solvers as GA, Simulated Annealing o Differential Evolution. I need ... 1answer 53 views ### Determination of Young's Modulus for a Finite Element Code I am writing a finite element code for my final year project of BS Mechanical Engineering. The geometry is an integration of several parts composed of different materials. I don't have exact values of ... 1answer 83 views ### Well-posedness of Navier-Stokes equation Before running a simulation for turbulence (e.g Rayleigh-Benard Convection), how do we check for well-posedness of Navier-Stokes with other equations for a given boundary condition?? Can someone ... 0answers 81 views ### Are there well-known methods for navigating on kd-trees? When you have a mesh, there are many well-known methods to navigate it, as for example using a half-edge data structure, that allows easy circulation around faces and vertices. Are there similar ... 1answer 191 views ### Do computational scientists typically also become domain experts? Let's say I'm interested in fluid dynamics, specifically in fluid-structure interactions -- and I want to get into modeling, simulations and experiments. I am a mathematics student by training, ... 1answer 38 views ### Binary combinatorial optimization with hard to compute costs I have a combinatorial problem regarding the optimal placement of sensors. I want to find the optimal placement of N sensors, given M possible locations, N < M. Right now I'm working with ... 1answer 334 views ### Limitations with dynamical systems vs. PDEs? As a computational scientist, are there limitations to studying dynamical systems — systems of odes in which each state variable evolves with time — compared to studying PDEs? For instance, it seems ... 1answer 122 views ### Why don't we call the simulation “a model for …”? When a set of model equations, e.g. some coupled differential equations, has solutions that behave in ways similar to real-life phenomena such as blood flow in the heart, a wave movement, or a plate ... 1answer 39 views ### How to use QZ decomposition for single matrix in Matlab? Can I use QZ decomposition on a single square matrix in Matlab? Like, [Aa,Q,Z]=qz(A); 1answer 91 views ### Optimization algorithm / approach for suggesting what goods to buy and sell in a marketplace? A toy problem would probably be best to explain it this. Let's say we have 100 people, each with 4 unique types of items (to simplify things, let's say it's the same four types of items for each ... 1answer 55 views ### Classical vs. modified Gram-Schmidt It is often said that modified Gram-Schmidt is more robust with respect to rounding errors than classical Gram-Schmidt, but it is very hard to find a good explanation / example of why this is so. Can ... 1answer 38 views ### How to define P0- Piecewise constant basis function in finite element method? Suppose if we take X_h(G) as finite element space then this space (space of piecewise constant basis function)is defined as$$X_h=\{v: v|_{T}=c_{T}, T \in \mathbb{T}\},$$where \mathbb{T} is a ... 1answer 367 views ### What's the terminology for this alternative minimization algorithm? Say the model is F(x_1)G(x_2)Z(x_3) = y \in \mathbb{R}^N, with F,G,Z explicitly known, we are given observation of y as y_b \in \mathbb{R}^N to find the value of x_1, x_2, x_3 for each ... 0answers 39 views ### Cubature rule in unit Sphere in \mathbb{R}^{3} I need to find the cubature rule for the following integration$$\int_{S^{2}} f(s,\tilde{s})d\tilde{s} ds,$$where S^2 is the unit sphere in \mathbb{R}^{3}. 1answer 79 views ### Calculating the Convolution Using DFT (FFT) I have the following convolution as part of a numerical simulation.$$T(r)=\int \mathrm{d}^3r_2\, p(r_2)f(r_2)\alpha(r-r_2)\, .$$My problem is that the analytical expressions for f and p do ... 0answers 12 views ### Error on the fit parameters when several good fits exist I am using the reduced chi-squared statistic to determine the goodness of fit. I run several simulations and determine that a parameter 'p' has a certain range of values that all give values between 0.... 1answer 51 views ### Finding curves where function goes to zero in two dimensions Suppose f(x,y) is a complex function of two real arguments with roots* that are not discrete points but lie in curves. (Is there are term for this characteristic?) An example is shown below: the ... 0answers 75 views ### Sensitivity of BFGS to the accuracy of the gradient I am studying how to speed-up the BFGS method using quantum computing techniques. I have used a method of speeding up the gradient of the function, but it sacrifices the precision value of the ... 1answer 52 views ### Givens rotation vs 2x2 Householder reflection The usual story of Givens rotations vs Householder reflections is that Householder reflections are better if you want to map a long vector to e_1, while Givens is better if you want to map a 2-... 0answers 22 views ### Fast convergence of smoothing of periodic noise I have essentially periodic data from a simulation (not exactly periodic but is qualitatively fairly periodic), and I'd like to take an average or noise filter of some sort that I can get a well ... 2answers 65 views ### How to include penalty in a Objective Function with Python? GEKKO I'm trying to include a "great M" penalty in my objective function. I want use the entry x vector values as entry values in a function. A fixed maximum value is took initially for the returned value ... 1answer 61 views ### Best way of storing numerical data in a compact manner, while leaving it accessible for tools like GnuPlot? My simulation, written in C++, generates a large amount (roughly ~500) of text files for each set of parameters I try to simulate, with four columns of ~5k double values in each file. Furthermore, to ... 1answer 274 views ### Iterative linear solver for “ugly” saddle point system I am a graduate student majoring scientific computing. The numeric model I made caused a very ugly-looking saddle-point linear system. It is not symmetric at all and I will attach the sparsity pattern ... 0answers 23 views ### Question about the visible and hidden neurons in neural networks methods My problem is the following : I found the ground state energy (for the Ising model) with neural networks (more specifically RBM). I reproduced the same result but by increasing every time the ratio =... 1answer 71 views ### Software to simulate molten salt flow and thermodynamic operations I was curious if there was any software (preferably in C++, Java, and/or python) that could be used to simulate the following: Heat capacity of a fluid Heat transfer through a liquid and a solid ... 1answer 80 views ### Reference request: Riks method (Nonlinear FEM) I'm struggling to find a good detailed reference explaining the Arc-length method or, more generally, Riks method and its derivations. I looked for the classical books in nonlinear mechanics (the ones ... 0answers 90 views ### Numerically estimating expected value of f(x) when x is normally distributed I need to estimate$$ \mathbb{E}_x[f_i(x)] = \int_{\mathbb{R}^n} f_i(x) p(x) dx $$for many functions f_i(x), where p(x) is the density of a normal distribution. The evaluation of all the ... 0answers 47 views ### Evaluate Nth root of a rational to a correctly rounded float Excuse my lack of vocabulary for I have no formal training in this field, which is also why I ask this question - it may be trivial or it may be impossible. I want to evaluate an expression in the ... 2answers 51 views ### Verifying convergence of a stationary solution to a PDE with the Runge-Kutta method I am numerically solving a nonlinear wave PDE using the Runge-Kutta method, and I know the solution I am looking for is constant in time, but I do not know the solution. What is a good way of ... 1answer 61 views ### Convex optimization with constraints involving matrix inverse I have the following convex optimization problem. I would like to ask is there any efficient way to solve it in Python? Can I use CVXOPT package? If so, any detailed instruction? Thanks a lot.$$ \...
I want to simulate a diffusion environment given by the differential equation \frac{\partial u(x,y,t)}{\partial t}=D\left(\frac{\partial^2 u(x,y,t)}{\partial x^2}+\frac{\partial^2 u(x,y,t)}{\...