# All Questions

8,182 questions
Filter by
Sorted by
Tagged with
64 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....
200 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, ...
35 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, ...
31 views

121 views

### Prescribing variables as an excitation in Runge-Kutta method

I am using Runge-Kutta to solve a $3 \times 3$ 2nd order linear ODE $$M x'' + C x' + K x = 0$$ and initial conditions are all zeros. Then I prescribe the 2nd variable to follow a given path. As for ...
44 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 ...
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, ...
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 ...
504 views

### Power series regression linear fit in VBA excel

I wrote a program that calculates the best fit in VBA excel for the following model $$y_k=c_1x_k+c_0+c_{-1}(x_k)^{-1}$$ solving for the best fit parameters $c_1$, $c_0$, and $c_{-1}$. However I ...
24 views

### Change of random variables and check by plot

Question As a test, I transform a uniform distribution over the unit square. But when I check the transformed distribution with Monte Carlo, it is wrong. What went wrong? Thanks. Problem Random ...
35 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 ...
68 views

### Numerov method for Schrodinger equation

While learning about numerical methods for solving the Schrödinger equation I came across Numerov's method. I want to get the solution for the harmonic oscillator by alreading giving the eigenvalues. ...
54 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 ...
84 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 ...
471 views

### Finite volume a posteriori error estimation

I'm wondering what alternatives there are to a grid convergence study to judge solution accuracy for a given grid resolution when doing steady-state RANS simulations on an automatically generated ...
4k views

### How can the gravitational n-body problem be solved in parallel?

How can the gravitational n-body problem be solved numerically in parallel? Is precision-complexity tradeoff possible? How does precision influence the quality of the model?
2k views

### 2D cross section from 3D surface

I am trying to apply the "restoring force surface" method to a dynamic linear system. The idea behind this method is that, knowing acceleration, displacement, velocity and input force it is possible ...
61 views

### Plasma Simulation Software Advice?

I’m looking for software that can simulate “hot” plasmas of multiple ion species...so some sort of simulation software that could calculate ion temperature and density distributions taking into ...
233 views

### Shape measure for C-shaped objects

There are many well defined measures for many basic geometrical objects such as rectangularity (area coverage of minimum bounding rectangle), triangularity (area coverage of minimum enclosing triangle)...
94 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 ...
343 views

### Difficult bug in my 2D Compressible Euler solver

For the past few days, I have been writing a numerical solver for the 2D compressible Euler equations for an ideal gas. My numerical method has been the Local Lax Friedrichs or "Rusanov's method." ...
119 views

### Single nodes after mpmetis partitioning

I was checking partitioning capabilities of Metis (mpmetis) when I noticed, that it leaves two single nodes. I have marked them in red Have you seen something similar or maybe it is my mistake? The ...
336 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 ...
901 views

### Pixel-To-Angle Transformation in Camera Image

I'm trying to localize points I see in a camera image in terms of azimuth and elevation and match points between shots. Individual shots should differ only in rotation around the camera's center (...
124 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 ...
4k views

### What software is good to use for parallel debugging?

I'm not running any parallel code right now, but I anticipate running parallel code in the future using a hybrid of OpenMP and MPI. Debuggers have been invaluable tools for me when running serial ...
47 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);
41 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 ...
78 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 ...
59 views

### Activation function with special conditions in machine learning

I only have a basic understanding of deep learning, but looking through it I had an idea on how to approximate global minima of the NN. However, for it's activation function I am only able to use: ...
59 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 ...
346 views

### DG local equation, how to interpret mean-averaged test function

In the paper http://www.sciencedirect.com/science/article/pii/S0045782509003521, an HDG element-local equation is described on page 584 equation (4), with one of the equations taking the following ...
369 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 ...
78 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 ...
40 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}$.
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 ...
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....
62 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 ...
89 views

### MINLP with GEKKO - Modeling discrete variables

I'm trying to define a MINLP optimization problem with GEKKO in Python, and I want to use some variables with fixed values. For my first variable, x1, I need to define the following values (as would ...
673 views

### 2D Ising Model, heat capacity decreases with lattice size

The problem I'm trying to make a metropolis simulation of the 2D Ising model. Basically, it's the following, for each monte-carlo step: Visit each lattice site, Compute energy required to flip ...
60 views

### ISING2D with Mathematica. Searching a correct way to compute the heat capacity (mean values over several iterations)

I'm trying compute the heat capacity $C_v$ out of my simulation for the 2D-Ising model which is given by $C_v = \frac{\langle E^2 \rangle - \langle E \rangle^2}{T^2N^2}$ ($E$: Energy, $T$: ...
24 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 ...
281 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 ...