All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
70 views

How to compute the following Crank-Nicolson scheme for the viscous Burgers' Equation?

I am attempting to replicate results from this article. I'm not sure why but my results are completely different and wrong. For example, the exact solution with parameters ($x=0.1$, $T=0.01$, $Re=0....
3
votes
2answers
75 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 ...
1
vote
0answers
37 views

3D log density plot in ParaView

I have a .csv file of thousands of (x,y,z) point particles that I would like to visualize in ParaView. I am able to plot a 3D scatterplot using the TableToPoints, and by decreasing point opacity I can ...
1
vote
0answers
24 views

Need suggestions about technical difficulties - Drying + Pyrolysis of coal particle

In OpenFOAM by default, the FireFOAM is well supported for solid pyrolysis modeling. With that in mind, I managed to built my solver for a modified version of pyrolysis (for dry coal - without ...
1
vote
0answers
50 views

Numerical solution to the Landau-Zener problem

I tried to use a midpoint method and numerically solve the Schrödinger equation for the original Landau-Zener (LZ) problem: a $2\times 2$ Hamiltonian $$\left(\begin{array}{c} \alpha t\\ \delta \end{...
1
vote
0answers
36 views

How to deal with a huge system of ODEs in Boost ODEINT?

I am using the C++ library ODEint, which is part of Boost, to solve an extremely large system of coupled ODEs - in particular 1975 equations with large rational functions in the coefficients. In the ...
3
votes
1answer
51 views

Optimizing for multiple objectives

Optimizing two models here, each model having its own set of parameters and an objective, but both models run on the same data which is difficult to compute, and which is computed based on both models'...
1
vote
2answers
81 views

Simulating the heat equation with insulating material

My plan is to solve the heat equation in the right half portion of the domain, while having the left half completely isolated with constant temperature. To do so, I model the left half with a very low ...
5
votes
2answers
127 views

Is there an efficient way to form this block matrix with numpy or scipy?

Is there an efficient way to form this block matrix with numpy or scipy? $$ \left[ \begin{array}{cccc} \mathbf{B} & \mathbf{0} & \cdots & \mathbf{0}\\ \mathbf{AB} & \mathbf{B} & \...
1
vote
2answers
76 views

Fast iterative approximate order-oblivious Orthogonalization algorithm?

I have set of N m-dimensional vectors $\{\phi_i\}$ which gradually loose mutual orthogonality in an algorithm. => I have to re-orthogonalize them every few iterations. But if I do e.g. Gram–Schmidt ...
3
votes
1answer
67 views

Why are the round-off errors when solving the linear system $Ax = b$ of order $\varepsilon_\text{mach} x_j$?

I was reading a paper on arXiv where, in Section 2.4, the authors are discussing the error that arises in the solution of a linear system $$Ax = b,$$ or, to match up better with the paper, $$\Phi \...
2
votes
0answers
40 views

Classification of multiobjective optimization algorithms

I am looking for a good (canonical?) overview paper(s)/book(s) on the classification of multiobjective optimization algorithms. I am focused on obtaining a representative set of Pareto optimal ...
1
vote
1answer
83 views

Iterative solution of ill-conditioned matrix systems

I want to solve a matrix system of the form $Ax=b$ where $A$ is ill-conditioned. The matrix system comes from a structural simulation problem which was discretized using finite elements. I do not have ...
2
votes
0answers
78 views

Heisenberg Model python : Specific heat capacity for spin 2

I have the correct plot for specific heat capacity when I am using the formula which is $C_V$ = differentiation of entropy with respect to temperature. However, When I try to calculate $C_V$, by using ...
7
votes
1answer
144 views

Numerical calculation of Integral of Si(x)/x

I'm interested in evaluating \begin{equation} \int_0^x \frac{Si(t)}{t}\;dt \end{equation} Where \begin{equation} Si(x) = \int_0^x \frac{\sin t}{t}\;dt \end{equation} I've found a nice method for ...
5
votes
1answer
101 views

Approximate $\|\Delta f\|^2_{L^2(\Omega)}$ in finite element context

I have minimization problem of the form $$ G(f) + \|\Delta f\|^2_{L^2(\Omega)} \to \min $$ over all $f\in C^2(\Omega)$, $\Omega$ being closed and bounded. Let us forgot about $G$; I'm interested in ...
1
vote
0answers
33 views

Pseudospectral method for Rayleigh-Benard with constant temperature gradient

$$ \nabla\cdot \mathbf{u} = 0 \\ \frac{\partial \mathbf{u}}{\partial t}+\left(\mathbf{u}\cdot \nabla\right)\mathbf{u} = -\nabla p+\nu\nabla^2\mathbf{u}+\alpha g\theta\mathbf{e}_z\\ \frac{\partial\...
4
votes
1answer
70 views

Is there a library that allows einstein summation on dense, sparse, and LinearOperator type tensors

Numpy's einsum only works with dense tensors. Is there an alternative that also works with sparse tensors and linear operators? For example, I might have a ...
2
votes
0answers
34 views

What is the best methodology for physics simulators of large floating base rigid body systems?

I want to implement a physics simulator for large floating base rigid body systems from scratch. The Rigid Body Dynamics Systems (RBD) should typically have the following characteristics: About ~50 ...
4
votes
0answers
88 views

An optimization method for bounding the eigenvalues of a unknown non symmetric matrix

Given a positive objective function $f$ that acts on a real-valued matrix $A$, I am interested in the following problem $$\underset{A \in \mathbb{R}^{n \times n}}{\text{minimize}} \quad f(A) \quad \...
1
vote
1answer
41 views

Doing computations on a very large numpy array: streaming the calculation vs out-of-core memory

I am trying to perform a calculation in numpy that depends on several parameters, and involved the creation of many intermediate arrays. These intermediate steps involve integrals over more parameters....
0
votes
0answers
63 views

Reducing run time of a numerical calculation using a mex file in Matlab

I wrote a Matlab code that involves doing a numeric calculation (relaxation), but it is quite slow. I learned of the possibility of using a mex file to run a C code and integrate it into Matlab, so I ...
2
votes
0answers
80 views

Implementation of boundary conditions for 1D Euler equations

I'm trying to solve 1D Euler equations with gravity in spherical coordinates using a finite-difference TVD MacCormack method on a non-uniform grid of $N$ components, following the method provided in ...
2
votes
2answers
109 views

Data structures of AMR(Adaptive Mesh Refinement) with quadtree

I am graduate student and recently tried to implement quad-tree based AMR. Well I have implemented simple Poisson Solver on node-based quadtree, but I am not sure that my data structure is right. To ...
0
votes
0answers
30 views

Solutions in Ngspice do not converge to right value

I recently noticed while using Ngspice that the solution converges to a deviated value if the number of iterations per unit period for a square wave is less than 100, i.e. if I am using a square wave ...
3
votes
0answers
106 views

A maximization problem, with motivation in machine learning

Consider the minimization problem described this paper. Let $f_{\lambda}$ be the minimizer. As a part of extending my work, I am able to show the following facts $$\lim_\limits{\lambda \to 0}\|f_{\...
1
vote
1answer
26 views

Send Petsc sequential matrix to another MPI rank

I am doing specific tests on matrices, so forgive me if this question doesn't seem related to Petsc typical use. I have a SEQAIJ matrix on one process and I need ...
1
vote
0answers
63 views

How to translate Python infinitely big integer into Cython?

I want to factorize very huge numbers (e.g. 100-bits, 200-bits numbers) with Cython. Hi everyone, I implemented the Elliptic Curve Method for factorization into Python 3.6. Now, I want to speed up my ...
6
votes
0answers
60 views

Why not use the preconditioned residual as termination criterion for preconditioned CG?

I have a Poisson equation with wildly varying material parameters (1 .. 1000), wildly varying element sizes (5 nm .. 100 um) and some quite anisotropic (tetrahedral) elements (100 nm x 100 um). I use (...
0
votes
0answers
17 views

Coupling 1D-3D problem in FENICS

I was wondering whether any of you knew if FENICS has the capability to solve coupled 1D-3D problems that are linear non-iteratively? As an example, pipes embedded in a porous domain will provide ...
2
votes
0answers
41 views

Verification on pressure predictor method for CFD code

I have developed a python code for a lid-drive cavity model. However, my results are not converging. The algorithm of my code looks like this: Euler Momentum Equation looks like this: $$\frac{u^{n+1}...
10
votes
1answer
129 views

Are there testing frameworks for numerical software development

I found that a lot of my computational science programming has testing requirements that are not covered by standard test frameworks: Computation time testing To make sure that algorithms don't get ...
0
votes
0answers
38 views

Can I use matplotlib to plot the surface of a 3D body?

If Matplotlib could volume render, I would not ask this question. But it can't. Can I however instead use Matplotlib to plot the surface of a 3D body? I.e. is there a way to (i) triangulate the ...
1
vote
1answer
40 views

What is the exponential trick to include laplacian term in Rayleigh-Bernard simulation

I have come across a Rayleigh-Bernard simulation code which doesn't have the laplacian term but an integrating factor (in the exponential form) containing viscosity and diffusivity. I found out that ...
1
vote
0answers
14 views

Equi-order in pressure correction schme of Navier-Stokes equation

I am wondering if there is an stabilized equi-order scheme in pressure correction scheme in solving Navier-Stokes equation? Usually P2-P1 element combination is used to solve NS equation, and a PSPG ...
0
votes
1answer
22 views

Dealing neighbor list in NVT Monte Carlo (MC) simulation

I'm making a NVT Monte Carlo (MC) simulation code with only short range interaction. I found many MC tutorial codes (usually Lennard-Jones system) in online. However, most of them are doing energy ...
0
votes
0answers
6 views

Controller sensitivity/aim reverse engineering. Acceleration curves, deadlines, etched

A machine learning project I am working on requires me to interface with an Xbox controller connected to a PC. The implementation must do the following two things: Record the joystick input from the ...
1
vote
1answer
51 views

Software for parallel incomplete LU factorisation

I am looking for a software package to compute incomplete LU factorisations in parallel. Further considerations are: The package must allow for arbitrary level-of-fill or threshold-based truncation. ...
2
votes
1answer
72 views

What is this discrete optimization problem called?

It feels like this problem should be commonplace, but I don't know what it's called: Minimize $$ \sum_{i=1}^{n}a^{(i)}_{k_i} + \sum_{i=1}^n\sum_{j=i+1}^n b^{(ij)}_{k_i k_j} $$ with respect to ...
3
votes
1answer
104 views

Matrix condition number and reordering

Does the condition number change when a matrix is reordered by e.g. Cuthill Mckee or some other method?
1
vote
1answer
95 views

Problem concerning a part of a simulation for the Ising Model

I was wondering if anyone could help me with a simulation in Python (there is a small part of the code where I have a question) about the Ising model. First, I wanted to get the magnetization $M$ ...
1
vote
0answers
26 views

How to set the errorbars in a different color from the plot in Matlab? [closed]

When making a plot in Matlab using errorbar(...) the color of the error bars is the same as the plot. How do I set them to be in a different color? I tried looking ...
2
votes
0answers
26 views

Find solution to Polynomial Sequences without going through variety in Sage

I'm computing the Groebner basis of an ideal defined over the QQ ring. Once I have this Groebner basis, I would like to obtain a set of values that satisfy the equations in the Groebner basis. I know ...
0
votes
0answers
50 views

How to do a Hoshen–Kopelman algorithm in Matlab with periodic boundary conditions?

Say I have an array s with elements of 0 and 1. From my understanding, a Hoshen–Kopelman algorithm for s will be (in 3 ...
0
votes
0answers
31 views

Dividing Point Cloud into voxels

I am reading a paper on implementing convolution neural network for a 3D point cloud. In this paper, they are dividing the point cloud into voxels. Is there any easy way to do it using point cloud ...
2
votes
0answers
25 views

Minimize number of math operation of a specific matrix vector multiplication?

Let's say we have a Matrix M and a column vector v like below multiply equals Assume we can only perform multiplication, addition and substraction operation. With normal approach we need 3 ...
1
vote
1answer
67 views

What is a good library in Python for correlated fits in both the $x$ and $y$ data?

I have $x$ and $y$ data, both of which have their own covariance matrices. scipy.optimize.curve_fit will accept a covariance matrix for the $y$ data, called ...
1
vote
1answer
56 views

What is the right way to set up two random tensor fields which have an identical average diffusivity

I want to compare some properties of traveling waves through two randomly diffusive media. The traveling waves follow the fisher equation: $$\frac{du}{dt} = \nabla(\mathbf{D}_{\gamma} \nabla u) + u(1-...
2
votes
0answers
55 views

Solving a simple Shallow Water model

Hi. I have a question at Mathematics and they suggested post here, once it's not common. I transcript as following. Many thanks I need to solve with basic methods this simple Shallow Water Model: $...
1
vote
0answers
16 views

Regarding Amdahl's balanced system law [closed]

One of the paper titled "Rules of Thumb in Data Engineering" (Jim Gray et. el.) mentions some calculations based on Amdahl's balanced system law. Link to paper: https://www.microsoft.com/en-us/...

15 30 50 per page