All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
33 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 ...
4
votes
1answer
87 views

Improve Mandelung constant code

I'm learning and improving my Python skills. I did a program in Python about Mandelung constant. But, I'm having kind of a problem. The Mangelung constant is calculated using this sum: $$ V_{total} =...
2
votes
1answer
23 views

Can I solve a model in GEKKO with Black Box, Simulated Annealing or GA solvers?

I'm trying to use my current GEKKO model with different solvers methodologies. I don't know if I can also use global optimisation solvers as GA, Simulated Annealing o Differential Evolution. I need ...
0
votes
1answer
48 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 ...
0
votes
1answer
76 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 ...
4
votes
0answers
77 views

Are there well-known methods for navigating on kd-trees?

When you have a mesh, there are many well-known methods to navigate it, as for example using a half-edge data structure, that allows easy circulation around faces and vertices. Are there similar ...
7
votes
1answer
179 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, ...
4
votes
1answer
36 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 ...
3
votes
1answer
327 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 ...
2
votes
1answer
117 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 ...
1
vote
1answer
36 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);
6
votes
1answer
88 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 ...
1
vote
1answer
53 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 ...
0
votes
1answer
38 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 ...
3
votes
1answer
366 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 ...
0
votes
0answers
37 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}$.
3
votes
1answer
77 views

Calculating the Convolution Using DFT (FFT)

I have the following convolution as part of a numerical simulation. $$T(r)=\int \mathrm{d}^3r_2\, p(r_2)f(r_2)\alpha(r-r_2)\, .$$ My problem is that the analytical expressions for $f$ and $p$ do ...
1
vote
0answers
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....
1
vote
1answer
49 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 ...
5
votes
0answers
74 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 ...
2
votes
1answer
37 views

Givens rotation vs 2x2 Householder reflection

The usual story of Givens rotations vs Householder reflections is that Householder reflections are better if you want to map a long vector to $e_1$, while Givens is better if you want to map a 2-...
1
vote
0answers
22 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 ...
2
votes
2answers
57 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 ...
1
vote
1answer
61 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 ...
5
votes
1answer
274 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 ...
0
votes
0answers
23 views

Question about the visible and hidden neurons in neural networks methods

My problem is the following : I found the ground state energy (for the Ising model) with neural networks (more specifically RBM). I reproduced the same result but by increasing every time the ratio $=...
0
votes
1answer
68 views

Software to simulate molten salt flow and thermodynamic operations

I was curious if there was any software (preferably in C++, Java, and/or python) that could be used to simulate the following: Heat capacity of a fluid Heat transfer through a liquid and a solid ...
3
votes
1answer
74 views

Reference request: Riks method (Nonlinear FEM)

I'm struggling to find a good detailed reference explaining the Arc-length method or, more generally, Riks method and its derivations. I looked for the classical books in nonlinear mechanics (the ones ...
7
votes
0answers
89 views

Numerically estimating expected value of f(x) when x is normally distributed

I need to estimate $$ \mathbb{E}_x[f_i(x)] = \int_{\mathbb{R}^n} f_i(x) p(x) dx $$ for many functions $f_i(x)$, where $p(x)$ is the density of a normal distribution. The evaluation of all the ...
4
votes
0answers
44 views

Evaluate Nth root of a rational to a correctly rounded float

Excuse my lack of vocabulary for I have no formal training in this field, which is also why I ask this question - it may be trivial or it may be impossible. I want to evaluate an expression in the ...
0
votes
2answers
50 views

Verifying convergence of a stationary solution to a PDE with the Runge-Kutta method

I am numerically solving a nonlinear wave PDE using the Runge-Kutta method, and I know the solution I am looking for is constant in time, but I do not know the solution. What is a good way of ...
3
votes
1answer
57 views

Convex optimization with constraints involving matrix inverse

I have the following convex optimization problem. I would like to ask is there any efficient way to solve it in Python? Can I use CVXOPT package? If so, any detailed instruction? Thanks a lot. $$ \...
0
votes
0answers
63 views

How one can simulate a system given by differential equation?

I want to simulate a diffusion environment given by the differential equation $$\frac{\partial u(x,y,t)}{\partial t}=D\left(\frac{\partial^2 u(x,y,t)}{\partial x^2}+\frac{\partial^2 u(x,y,t)}{\...
1
vote
0answers
64 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
66 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
32 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 ...
0
votes
0answers
22 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
49 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
33 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
50 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
80 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
121 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
70 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
66 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
80 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
71 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
139 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
100 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
32 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\...

15 30 50 per page