# All Questions

9,743 questions
Filter by
Sorted by
Tagged with
23 views

37 views

### Binarization for optimization problems

I have a nonlinear mixed-integer optimization problem, and because of very high complexity when solving it using methods like Branch and Bound, I resorted to solve it using alternating method and ...
321 views

23 views

### Plotting the motion of a positive charge in a cylindrically symmetric magnetic field

I want to plot the motion of a positive charge in a cylindrically symmetric magnetic field. I am assuming a cylinder around the z-axis, with the magnetic field going in clockwise direction. The B-...
49 views

### Merge N number of euclidean distance matrices to get overall single euclidean distance matrix

I want to find out the aggregated euclidean distance of a big dataset $D$ comprising of x and y coordinates where the data set is divided into N sub dataset where 1st sub dataset contains 1 to k-th ...
5k views

### Meaning of “-0.0” in Python?

We are finding in Python some occasional errors in our coordinate transforms and other similar computations that produce a result of -0.0. What purpose does this ...
19 views

### How can I create a frequency table per group? [closed]

My experiment involves 6 different groups (A...F) subjected to different concentrations of a compound for a period of time. I observed each group at 7 different points in time for 3 binary traits (&...
78 views

### Solving ODEs, Rotations, Angular Velocity, Euler Angles

I am implementing a simulation that needs to rotate and object based on known angular velocity (assumed constant for simplicity). I followed the ideas given below, pg. 32) https://graphics.stanford....
68 views

### Efficient multidimensional numerical integration in R and C++

I'm trying to perform a 4-dimensional numerical integration in R using a function I wrote in C++ code which is then sourced in <...
296 views

### Global stiffness matrix from element stiffness matrices for a thin rectangular plate (Kirchhoff plate)

I have the element stiffness matrix for a thin "kirchhoff" plate. The plate is 3 [m] x 5 [m] and is simply supported on all edges. It's thickness is 0,2 [m]. On the plate there acts a ...
108 views

### Reason behind different outputs for Fast Fourier Transform in Numpy and Matlab

Here is the output of Numpy np.fft.ifft([0, 4, 0, 0]) array([ 1.+0.j, 0.+1.j, -1.+0.j, 0.-1.j]) # may vary Here is the output of Matlab ...
47 views

### CVODE Warning: Internal t = *** and h = 2.09813e-13 are such that t + h = t on the next step. The solver will continue anyway

I have a system to simulate the bubble evolution at different temperature conditions. I used CVODE_DENSE algorithm to solve the ODEs and get the bubble size and ...
88 views

### How can i solve these Coupled differential Equations?

I am trying to solve this with odeint module. But the first equation is function of second equation. If i ignore dw/dz in first equation and second equation is function of first one. I can solve it ...
107 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 ...
61 views

114 views

### Imposing pressure variation instead of Dirichlet boundary conditions on Finite Element Method

I always see Finite Element codes solving PDE with Dirichlet or Neumann boundary conditions. But, I have a problem now consisting of a straight cylinder with a circular base (a simple 3D tube), with ...
76 views

### Finite element method for Stokes and Navier--Stokes with square elements only

I wanted to learn how to implement a code for the Stokes and Navier--Stokes equations 2D/3D. I already know how to implement it when the elements are triangles or tetrahedral. Do exists finite element ...
222 views

### Learning computational science through guided discovery

I am currently trying to get through Pattern Classification by Duda et al (for a course). However, the book seems too dense for me. Pattern recognition seems like a topic that could be better learned ...
I was testing the .fft package of numpy 1.16.1 in Python 3.7.2. In particular I was trying to verify that the transform resembles the analytical one for: f(x) = \mathrm{exp}\left[-\left(\frac{x-5}{2}... 1answer 53 views ### 2-norm and infinty norm of a system in controls How to compute 2-norm or infinity norm of following system? i am confused whether to calculate using simple matrix theory "where it don't regard for s domain" or H2 and H-infinty norm. ... 1answer 369 views ### Suitable finite difference method for a convection-diffusion system? I am trying to solve a system of PDEs H_{t} = \frac{0.3}{0.7} - \frac{0.005 B f(h(H))}{\theta} - \frac{0.3 f(h(H))}{0.7} + \frac{500}{0.7} (HH_x)_x + (HH_y)_y N_t = \frac{N_{in} - 0.002 [N] B f(h(... 1answer 585 views ### How can I evaluate more accurate energy eigenvalues from Schrodinger equation using shooting method? I am trying to use the "shooting method" for solving Schrodinger's equation for a reasonably arbitrary potential in 1D. But the eigenvalues so evaluated in the case of potentials that do not have hard ... 1answer 130 views ### Material properties for a node in a 2-material FEM code I'm trying to debug an FEM that I inherited, and I unfortunately do not have much knowledge of FEM. I only know FD and FVM. If you're modeling a system with 2 materials, there will be an interface ... 0answers 47 views ### Solving multiple linear regression in parallel I am working on a problem where I need to solve approximately 500 Million Linear Regressions (OLS). What would be the most efficient way to do this (e.g. using GPU or a some framework that can do this ... 1answer 175 views ### What is difference between L2 norm and H2 Norm? When someone refers 2-norm of system,L2 and H2 are used interchangeably by author and is rather confusing. Even the matlab has different functions for H-infinity norm and L-infinity norm. as shown in ... 2answers 106 views ### Need software for generating self-avoiding random walks on a tetrahedral lattice I am looking for FOSS code that can generate self-avoiding random walk trajectories on a tetrahedral lattice. The purpose of the exercise is to create random conformations of model polymer chains that ... 0answers 68 views ### Finite Difference Approximation for the Laplacian in 2D that produces a nonsymmetric matrix Consider the following PDE \begin{align} -\Delta u &= f \ \ \text{en} \ \ (0,1)\times (0,1) \label{P1} \\ u &= 0 \ \ \text{en} \ \partial ((0,1)\times (0,1)) \label{P2} \end{align} if we ... 0answers 39 views ### How to obtain smallest eigenvalues with Arnoldi iteration I understand that the Arnoldi iteration produces a basis which tends to include in its span the eigenvectors corresponding to eigenvalues of large magnitude (hence the analogy between the last vector ... 0answers 38 views ### Does the leap-frog algorithm conserve energy for n-body problems? The leap-frog algorithm is able to conserve to a certain extent the energy of a system, which flucutates as a cosine around a stable value. Is this true if we apply the algorithm to a n-body ... 2answers 77 views ### Time complexity analysis I want to know the time complexity of following code Say I have a list unique_element[] There is an array which contain elements {4,5,2,4,7,8,1,5,9,8,1} Now as per my code I want to find out the ... 1answer 59 views ### How to Calculate magnetic and electric field in 2D Magnetotelluric using Edge based Finite Element I calculate 2D Model of Magnetotelluric responses which are apparent resistivity and phase. I do the calculation for Transverse Electric (TE) mode. Then I used edge based finite element with ... 1answer 69 views ### Quantify difference between two discrete 1D solutions I have an ordinary differential equation that is solved as an initial value problem using different numerical schemes. I end up with several discrete time signals that should display a reasonably ... 2answers 93 views ### what finite elements are stable for the mixed form of the elasticity equations? The mixed form of the elasticity equations is to find the unique critical point of the Hellinger-Reissner functionalJ(u, \sigma) = \int_\Omega\left(\frac{1}{2}A\sigma : \sigma - (\nabla\cdot\sigma)\...
Consider the heat equation $$u_t = \kappa u_{xx}$$ with boundary conditions of $$u(x,0)=0\\ u(0,t)=100\\ u(l,t)=0$$ Numerical analysis by pyton can be done with ...