# All Questions

754 questions
Filter by
Sorted by
Tagged with
812 views

### Improper Numerical integral

I am self teaching myself python and computational physics via Mark Newmans book Computational Physics the exercise is 5.17 of Computational Physics. I have to shift the limits of integration for an ...
83 views

### How to compute turbulent energy cascade

I need to compute the kinetic energy cascade using a finite volume solution in an equally spaced grid. I wonder if it is more correct to first compute the kinetic energy in the space (or time) domain, ...
150 views

### Imposing boundary conditions for PDE quadratic eigenvalue problem

I have a quadratic eigenvalue problem of the form: $$(A_2 s^2 + A_1 s + A_0)\hat{v} = 0$$ where $s$ is the eigenvalue. The matrices $A_i$ contain derivatives up to order six, and I have six boundary ...
8k views

### Using scipy.quad to calculate difficult integral

When evaluating the integral below in python using scipy.quad I get the following warning: UserWarning: The maximum number of subdivisions (50) has been achieved. If increasing the limit yields no ...
364 views

### Feasibility checking

Consider the following optimization problem: $Min\;\;\; CX$ $AX\geq b$ $x_ix_j= x_s x_t\;\;\; i\neq j \neq s\neq t$ $x_j\geq 0;$ Where $A$ is the adjacency matrix and $C$ is a constant vector. ...
59 views

### Vortex Lattice Method: better basis than horse-shoe vortex?

I read several introductory texts about potential flow and vortex lattice method. Basically, it is fitting of some velocity field described by conditions on velocity at some control points using basis ...
87 views

### Classification of method for solving PDEs

If I have a system of equations as follows (where $i = \sqrt{-1}$): $$\frac {\partial A}{\partial t} = iA^*B - A \tag{1} \\$$ $$\frac {\partial B}{\partial z} = AB^* - B \tag{2}$$ Using the ...
166 views

### Optimization of a blackbox function

Let's say that we have an objective function $f(\mathbf x,\mathbf y)$ which has the parameters $\mathbf x=[x_1\ldots x_n]$ and $\mathbf y=[y_1\ldots y_n]$. Here, $\mathbf y$ is a blackbox variable ...
51 views

### Roe Riemann solver for perfect gas mixture

I have working program for solving one-component 1D Euler equations with Roe's approximate Riemann solver constructed according to this pdf. My implementation of the algorithm is as follows ($\rho$ is ...
300 views

231 views

### Linear solve using CHLOMOD in C

I am using the open-source CHLOMOD (as here http://faculty.cse.tamu.edu/davis/suitesparse.html) in order to solve a linear system Ax=b (performing A/b=x) in my domain decomposition code but I am ...
728 views

### How to define the derivative for Scipy.Optimize.Minimize

I am trying to use scipy.optimize.minimize to minimise a quadratic objective function: $f(x) =x^\top Q x$. As a start, I have successfully implemented this using the built-in Nelder-Mead Simplex ...
178 views

### Is there any rapid way to calculate the determinant of NXN covariance matrix?

I searched the web and found some C code for calculating the determinant of a $n\times n$ matrix. This code however seems timing complexity, and run pretty slow especially when handling a larger ...
276 views

### boundary conditions of linear advection problem

I am solving the 1D advection problem given by: $$\frac{\partial u}{\partial t}=-c\frac{\partial u}{\partial x}$$ where c is the wave speed, and u is the unknown field variable, and x and t are time ...
243 views