All Questions

3
votes
4answers
124 views

Numerical integration in Python with unknown constant

I’d like to solve the below equation for the unknown $T$: $$\int_0^\infty \frac{x^2}{\exp\left(\frac{x}{T}\right)-1}\kappa_x \mathrm{d}x = C,$$ where $C$ is a known constant and $\kappa_x$ is some ...
1
vote
1answer
54 views

Formulation of the least-squares parameter estimation problem

I have a system of 10 ordinary differential equations of the form, $$\frac{dy_1}{dt} = f1(V1,k1,y1,y2)\\ \vdots \\ \frac{dy_{10}}{dt} = f_{10}(V_{10},k_{10},y_{9},y_{10}) $$ I want to estimate the ...
5
votes
1answer
134 views

Advantages and disadvantages of space-time finite element methods

I have heard of space-time finite element methods. Although I was able to find some articles that describe the different possible methods from a mathematical point of view (thanks to Space-time finite ...
-1
votes
0answers
75 views

Finite Difference Method Algorithm

I'm trying to devise an algorithm for the finite difference method, but I'm a bit confused. The ODE in question is y''-5y'+10y = 10x, with y(0)=0 and y(1)=100. So I need a way to somehow obtain the ...
0
votes
1answer
56 views

Imposition of Dirichlet BC for Fourier pseudospectral in this paper

I was trying to implement the algorithm from the paper "Adapting a Fourier pseudospectral method to Dirichlet boundary conditions for Rayleigh–Benard convection". I am having a hard time to ...
1
vote
1answer
344 views

What is the state of the art in solving stiff initial value problems?

I'm looking for current references on solving stiff ODEs. Most of what I know (say, BDF methods) apparently date back to the 1980's, and I feel like a lot of progress should have been made in that ...
0
votes
0answers
40 views

Avenues for application based research in network science for researchers from engineering departments

TL;DR: Is the field of network science ripe for engineering researchers? Network science has developed into a mature field for the study of complex systems. Huge amounts of works have been published ...
1
vote
1answer
100 views

Solving differential equation in Python with variable coefficients (I just know the coefficients numerically)

I am trying to implement a routine to solve a differential equation in Python. Basically the kind of equation that I am interested in solving is of the form: $\displaystyle \frac{d}{dx^2} \left(x y(x)...
0
votes
1answer
57 views

Error for the finite differences scheme — Advection equation

Consider the advection equation (1D in space) $$ \frac{\partial u}{\partial t} + V\, \frac{\partial u}{\partial x}=0 $$ and we solve it numerically on $[0,1]\times [0,1]\ni (t,x)$ using a forward ...
0
votes
1answer
60 views

Is there a better way to do run time analysis than this?

I currently have 2 different functions with options to vectorise them: acc_rej_sine(max_iter, algorithm=None) and ...
0
votes
0answers
17 views

Scipy basinhopping custom step update and constrained looping

I am searching for the global minimum of a certain function and trying to use its gradient (here same as Jacobin) to guide the step counter. However, my x is fix ...
1
vote
2answers
64 views

How to compute 16 different simulations on parallel with pbs script on the same machine

I have a 32 cores machine, and I need to run 16 different dynamics simulations in parallel on it. I want the 16 jobs to run in parallel, not sequentially, on the same machine. The 16 dynamics input ...
1
vote
0answers
30 views

How to numerically calculate the transition dipole integral in periodic systems?

Now I have wave functions $\psi_a$ and $\psi_b$ of two states in Gaussian CUBE format. I'd like to evaluate the transition dipole moment integral $\pmb\mu$ between these two states. As my simulation ...
0
votes
0answers
13 views

Transformation of Weights from Normalized Support Domain to Original Support Domain in LRBF-DQ Meshfree Method

The Local Radial Basis Function based differential quadrature method, proposed by Shu link, is a meshfree method in which differential operators are expressed as weighted-linear sum of function values....
1
vote
1answer
61 views

Approximation Error in a Finite Difference Approximation of the Square of Derivative

First Part: (First-order derivative) Assuming $f$ is an infinitely differential function everywhere, the Taylor series of $f(x + h)$ at $x$ is \begin{align}\tag{1} f(x + h) = f(x) + hf'(x) + \frac{1}...
0
votes
1answer
49 views

Stability of PDEs

I am currently trying to solve some PDEs with FiPy. At page 56, the manual mentions (https://www.ctcms.nist.gov/fipy/download/fipy-3.0.pdf). The largest stable timestep that can be taken for this ...
1
vote
0answers
26 views

Oscillations when solving parabolic heat equation with FTCS

I'm wondering if someone could help me out, or point me in a direction of how I can understand the following oscillations that occur when I solve the Porous Medium Equation $$u_t = u_{xx}^{m+1}$$ ...
0
votes
0answers
11 views

Finding Maximum Value of CST Parameterization over an interval

I have a CST parameterization for a shape over an interval (0,1), so I have y as a function of x like so $$y = C(x)*s(x)$$ where $$C(x) = x^{n1}*(1-x)^{n2}$$ and $$S(x) = \sum_{i = 0}^{n} A_i(x)^i(1-x)...
5
votes
1answer
91 views

Whittaker-Shannon interpolation: Accuracy dies with speedup; can it be fixed?

With a truncated Whitaker-Shannon series (cardinal series) $$ f(t) = \sum_{j = 0}^{n-1} y_{j} \frac{\sin\left(\pi( \frac{t-t_0}{h} -j)\right)}{\pi\left(\frac{t-t_0}{h}-j\right)} $$ we can naively ...
0
votes
0answers
61 views

Analytic vs discrete understanding of PDE

The PDE I am working with: $$\partial_tu = \nabla \cdot (a(x)\nabla u)-\beta(x)u\\ \partial_nu=0, x \in \Omega \subset \mathbb{R}^2\\ \beta(x)>0$$ Integrate the PDE: $$\int_\Omega \partial_t u=\...
0
votes
0answers
31 views

What will PDE discretization matrix look like for time and space? [duplicate]

Please note: this question is not a duplicate of this question since, while the PDE is the same, the nature of this question is different, i.e. the other question treats a different aspect of this PDE....
2
votes
0answers
69 views

Numerical solution to N-dimensional diffusion on simplex?

Assume I have a system of at least (but generally only) $N+1$ points in an $N$-dimensional space ($N > 3$ is possible). At each of these points $x_i, i=1,...,N+1$ I know an initial potential/...
1
vote
0answers
29 views

Can I use the Schur basis returned by ARPACK in a restart capacity?

Reading ARPACK documentation, I see that ARPACK will return an "orthogonal basis for the invariant subspace corresponding to the eigenvalues in D" if eigenvectors are not requested. Can this subspace ...
0
votes
1answer
54 views

Interpolation of function onto mesh gives different results, depending on mesh density

I wanted to test the numerical accuracy of my program. For that I wanted to interpolate the function $$f=I_0\exp\left(-100x^2\right)\exp(-100y^2)$$ onto a grid, defined on $$\Omega=[0,1]^2$$ by using ...
0
votes
0answers
46 views

Why do i just mutiply two scalar,but the window show me i need a square ,and error using in .*? [on hold]

Paper link: https://arxiv.org/pdf/1805.08898.pdf , op4 in page 6 I ran a cvx code,but the window show me there is a error in this code,but i don't know why Formula as below,i just show the c10 code ,...
0
votes
0answers
40 views

Derive a relation between multiple parameters, given constraints

I have a mixture of 4 liquids (their percent volumes being: $a,b,c,d$). By varying their volumes I get different data for the boiling point of the mixture. I have a sufficient number of such data (12, ...
1
vote
0answers
81 views

Connection between piecewise linear basis functions and RELU activation function

ReLU activation is defined as follows $$\sigma(x)=\max(0, x).$$ Let's assume that I have deep network of 1 hidden layer, than output from my layer has form $$ f(x)= \sigma(Wx +b), $$ where matrix W ...
0
votes
0answers
19 views

convex atomic function reformulation to meet concave dcp rule requirements

I have an atomic constraint of the form abs(w - w_prev) >= some_threshold It is supposed to get every value equal to or above my threshold. I am working on a ...
1
vote
0answers
34 views

Biconvex problem whose objective function depends on only one variable

I am solving the following biconvex problem: $$\min_{x,y} f(y)$$ $$s.t. ~~ g(x) \leq 0$$ $$~~~~~h(x,y) = 0$$ $$x \in X, y \in Y$$ where $X$ and $Y$ are compact convex sets, $g(x)$ and $f(y)$ are ...
0
votes
0answers
36 views

How to find out (numerically) whether a matrix is copositive or not?

A copositive matrix is like a positive semidefinite (psd) matrix, i.e., say $A$ is psd then $x^T A x \geq 0$ for $\forall x \in \mathbb{R}^n$ and $x \geq 0$. For PSD matrix we can perform the ...
4
votes
2answers
69 views

Efficient covariance matrix calculation MATLAB (every combination of rows from data)

My friend in the statistics department asked me how to do the following calculation efficiently. Suppose we have data $X\in\mathbb{R}^{N\times 2}$. He needs to do the following calculation: $$C_{i,j}=...
0
votes
0answers
53 views

Pursuing the field of computational physics professionally with a physics PhD [migrated]

Please let me know if I should migrate this question elsewhere if it is inappropriate for this site. This fall, I will begin my PhD program in physics at Johns Hopkins, and I would like to continue ...
0
votes
0answers
26 views

3D Tollmien-Schlichting Waves Imposed in a Channel Flow (Are Physics correct?, etc)

So I am trying to do some further tests on a 2nd-order code Incompressible Navier Stokes equations, by studying transition to turbulence in a Poiseuille flow. Specifically, I'm interested to see ...
0
votes
0answers
49 views

Implementation of flexible inner-outer GMRES

I would like to implement a flexible GMRES version using the GMRES itself as a preconditioner as suggested in these papers Saad and Simoncini. Having a linear system like $$ Ax=b$$ The algorithm ...
0
votes
1answer
51 views

Creating an Interpolation of a w = f(x,y,z) function

I am trying to finish a series of interpolation functions. The problem is more related with organizing the data than how to do the interpolations. Using the RegularGridInterpolator, I created this ...
0
votes
0answers
18 views

Applying multi objective optimization algorithm on journal recommendations

I am new in the field of multi-objective optimization. I am implementing a journal recommender system. Now, the problem is that I have to apply multi-objective optimization on final recommendations. ...
0
votes
0answers
32 views

Advection-Diffusion by using Lattice Boltzmann Method, Is it practical for engineering applications?

I want to use lattice Boltzmann method to solve advection-diffusion in three-dimensional space. In fact, my problem is related to drug release in human blood vessels and as a results, I'm interested ...
2
votes
1answer
46 views

Visualization of 3D streamlines in ParaView

Essentially I want to use paraview to recreate a flow visualization like the one shown in the picture above. I am able to create the 3d flow lines using a pipeline that looks like ...
0
votes
2answers
83 views

Overrelaxation with w < 0

Are there any circumstances under which using a value $w < 0$ would help us find a solution in over-relaxation faster than we can with the ordinary relaxation method? Over Relaxation Method: $$x'=...
1
vote
0answers
12 views

Translating grid with extrusion speed

I am putting into MATLAB code the equations that describe a plastic extrusion process. From a paper, I found I should use a spatial grid that translates with the extrusion speed, being the reference ...
0
votes
0answers
37 views

Sum of Inverse of Variables constraint in an optimization problem

I have the following optimization problem: $$\min_{ST_i} \sum_{i=0}^{|\Gamma|-1} \frac{S T_{i}}{T_i} \times \zeta_{i} \\ \text{s.t.} \sum_{i=0}^{|\Gamma|-1} \frac{S C_{i}}{S T_{i}}<=uBound,\quad ...
0
votes
0answers
10 views

An algorithm for matching pairs of numbers from two sets [migrated]

I need a push in the right direction in coming up with an algorithm for matching sets of numbers (actually dates). I have two lists (A & B) of integers e.g. A: [2, 4, 9, 15, 16, 20] B: [3, 7, 9, ...
0
votes
1answer
27 views

Problems with python's interp 2D

I am writing some functions to interpolate data. While using interp2D, somehow, a sample matrix works but when I change the size of the matrix, it returns an error. ...
0
votes
0answers
31 views

How to cap and mesh this cylindrical surface?

This question is related to my previous question. I solved the issue in the previous question and now I'm facing another problem about meshing that cylindrical surface shown here. I want to generate ...
1
vote
0answers
47 views

Discretizing a parabolic PDE with finite volume method

I want to discretize the following parabolic PDE: $$u_t = \nabla\cdot(\alpha(x)\nabla u)- \beta u\\ x\in\Omega \subset \mathbb{R}^2\\ \partial_n u = 0\\ u(t,0) = u_0(x)\ge 0, \alpha(x)>0$$ Given ...
0
votes
1answer
28 views

Is open foam Mac version compatible with Linux version

I am recently starting with OpenFoam. I have a Mac as my personal laptop, but I would have to use OpenFoam on linux in my lab. So my questions are: 1) Is the OpenFoam software independent of OS, so ...
1
vote
1answer
61 views

Gaussian Elimination Using Fortran [closed]

I developed the code below for performing gaussian elimination in order to evaluate the determinant of a matrix: ...
0
votes
2answers
101 views

Non-linear Boundary Value Problem. How to compute the Jacobian?

Consider a Boundary Value Problem: $$ \delta u''+u(u'-1) =0 \Leftrightarrow u''=\frac{-u(u'-1)}{\delta}=:f(t,u',u), \\ u(0)=a, u(1)=b $$ $\delta,a,b$ are known parameters. I want to implement Newton'...
-1
votes
0answers
31 views

Possible application of Polya's urn on real data (for Portfolio optimization)

I wanted to find some more information of this topic, but I found very little. I might be interested in optimizing a stock investment portfolio. Maybe I could use beta or some other common risk ...
1
vote
0answers
51 views

Determine truncation error of PDE discretization

The equation is $$\frac{\partial}{\partial x}\left(u\frac{\partial u}{\partial x}\right)=f(x)\\ 0<x<1, u(0)=u(1)=0$$ I'm discretizing this PDE using FVM as follows: $0=x_0=x_{1/2}<x_1<x_{...

15 30 50 per page