All Questions

1,843 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
67 views

Solving a non-linear BVP using Finite Differences method

Edit: I have updated my question using the feedback in the comments. I have a boundary value problem that I need to solve using finite difference. My task is specifically to solve it using finite ...
0
votes
0answers
20 views

Import stl file into Gmsh and create a 3d mesh for CFD

I am trying to develop a case study for teaching CFD. To this end, I am using OpenVSP, Gmsh and SU2. I have created a wing in OpenVSP, exported the CFD mesh as .stl file. Opened the .stl file in Gmsh ...
0
votes
0answers
32 views

Solving nonlinear pendulum using Runge-Kutta 4 for smaller steps

I am trying to solve nonlinear pendulum using 4th order Runge-Kutta method for limits between a=0.0 to b=110 seconds and simulated the results to observe the pendulum movement. But when I increase the ...
0
votes
0answers
11 views

Differential parameterized inequalities

Let $H$ be an Hamiltonian and denote $\vec{H}$ the associated Hamiltonian vector field. I am interested in solving numerically the following problem $$ \dot z(t) = \vec{H}(z(s),t_1,\ldots, t_p) \...
0
votes
0answers
13 views

Adding hydrogen from command line or through a python script to carbons only?

I am trying to find an easy to use tool to add hydrogen atoms to molecules in pdbqt format to carbon atoms only as I do not want to change the tautomeric state of the molecules, I tried rdkit, babel, ...
0
votes
0answers
73 views

Numerical flow visualization in 2D for a moving boundary,

I have a rigid body that moves according to a set of governing ODEs, and I'd like to numerically visualize the vortices that are shed by this object. How could I proceed? I've been reading up on the ...
0
votes
0answers
16 views

Can Scipy.optimize take a user-defined objective function that contains an ML model?

I have an optimization task that requires me to choose the optimal combinations of parameters, according to the prediction of a random forest model. My main obstacle is that scipy.optimize always ...
0
votes
0answers
17 views

Convex performance measure of classification

In the context of binary classifcation methods, I am looking for a performance metric that can be optimized in MATLAB. Since the data is not balanced, a good choice seems to be the so-called F1-...
0
votes
0answers
87 views

Is there a subfield within computational science research that's done on pencil and paper?

Is there an area of computational science research that can be done on pencil and paper (with results written up for a journal format later on)? I'm wondering if there is abstract proof-based linear ...
0
votes
0answers
6 views

Determine minimum set to fulfil check criteria

Assume I have a list of companies which can be classified according to company type (LLC, LTD), number of employees (0, up to 5, more than 5) and field of operation (Banking, Leisure, Tourism). Every ...
0
votes
0answers
60 views

Concept of Hermite WENO scheme

Hermite WENO schemes (HWENO, paper2004 and paper2015) are said to be known extension of WENO schemes evolves slopes, so two variables $\{\overline{u}_i,\,\overline{v}_i\}$ are updated in time. ...
0
votes
0answers
37 views

Optimizing vectors with equal elements

I am trying to distribute power across different devices, so that the sum is as equal as possible to the power setpoint. At the same time, the sum of power per phase must not exceed the power of the ...
0
votes
0answers
52 views

The relation between PDE order and discretization order

In Jasak's Ph.D. thesis (2000), a notion is given about discretization of a transport equation: For good accuracy, it is necessary for the order of the discretization to be equal to or higher than the ...
0
votes
0answers
30 views

Boundary Conditions for Continuum Mechanics

If I'm given some sort of shape and there is a displacement given but there are no external forces acting on the body, do I still need to write down the traction free boundary conditions or will there ...
0
votes
0answers
29 views

Choice of method for Stochastic Differential Equation Solution

I have to simulate the following differential equation: $$\dot{x}=p$$ $$\dot{p}=-x-x^3-\gamma p+F\cos\omega t+ \delta F(t)$$ where $$\langle F(t)F(t')\rangle=2\gamma k_BT\delta(t-t')$$ $$\...
0
votes
1answer
52 views

Simulating pressure waves at an impedance boundary

I am trying to simulate pressure waves crossing a boundary from one medium to another (e.g., water to air) in Matlab. The code that I have got so far, which is largely taken from Wikipedia on Partial ...
0
votes
0answers
50 views

How to solve odd-order differential equations in FEM? Petrov-Galerkin?

I've recently learned about using weighted residuals with the Galerkin method to numerically approximate even-order differential equations (for linear elements, I'm still a beginner). It seems for odd-...
0
votes
1answer
66 views

Simple particle-in-cell examples

I am studying about the 1D EM-PIC (Electro Magnetics using particle-in-cell) simulation. I want to have a simultaneous time-integration of the electric/magnetic fields plus the motion of free charges ...
0
votes
0answers
34 views

Spectral Clustering by Andrew Ng paper: theorem proof question

I recently read the paper "On Spectral Clustering: Analysis and an Algorithm" by Ng et al. Much of the paper centers on Theorem 2 and equation 8. To me, it appears there is no given or referenced ...
0
votes
1answer
92 views

Normalized legendre and quadrature basis for discontinous Galerkin method

I've successfully implemented a 1D DG code with non-normalized Legendre basis and I've now moved onto developing a 2D code using tensor products. For my 2D code I've chosen to have normalized ...
0
votes
0answers
44 views

Petsc matrix with DM objects takes too much memory

I have been learning petsc recently and made a simple solver for stokes equation on 3D staggered grid. My code is running on server with 200GB ram, but if I run a solver on 256^3 grid, memory used by ...
0
votes
0answers
48 views

Why this LJ molecular dynamics result doesn't converge?

I am doing a molecular dynamics simulation of Leonard Jones 6-12 potential. But instead of converging to a particular value. It always stays between -5.58 to -5.62. The standard value is -5.517. The ...
0
votes
0answers
40 views

2D diffusion equation using Finite Volume Method

i am working on an assignment problem: Consider a two-dimensional rectangular plate of dimension L = 1 m in the x direction and H = 2 m in the y direction. The plate material has constant thermal ...
0
votes
1answer
64 views

Gmsh for .inp file

How do I get an .inp file from Gmsh? I need to create a simple geometry and mesh it and define the boundary conditions in Gmsh and export it as an ...
0
votes
0answers
35 views

Unconditionally stable numerical method for 1st order non-linear coupled ODEs?

I am attempting to numerically solve the following system of ODEs: $$\begin{gather}\frac{dT_1}{dt} = f_1(T_1,T_2), \quad T_1(t=0)=T_{1,0} \\[3pt] \frac{dT_2}{dt} = f_2(T_1,T_2), \quad T_2(t=0)=T_{2,0}...
0
votes
0answers
54 views

Stress during unloading in FEM simulation of an elasto-plastic truss element

I am simulating the behaviour of a single bar composed of two node points by fixing one point and applying a force on the oder node with $F_x = 1$ and fixing $u_y=0$. I am assuming the material to ...
0
votes
1answer
36 views

Systematically outputting sign vectors of restricted hyperplane arrangement

(I previously asked this question on Sage's dedicated Q&A site, but got no response, so I figured it would be worth trying here.) I have a way of constructing hyperplane arrangements in Sage, ...
0
votes
0answers
72 views

Solving a nonlinear problem with a very small components with finite element method

In solving nonlinear hyperelastic solid mechanics problems, to converge to the correct solution we need to do step-by-step loading which makes the deformation at each step very small (for my ...
0
votes
1answer
66 views

Minimizing vector norm without using symbolic packages

I am new to octave and still learning what I can and cannot do with it. I am asked to write a following function ('ltrigp'): [a, b, c, info]=ltrigp(x,y) Where x, ...
0
votes
0answers
35 views

Information resources on the discrete element method (DEM)

A am looking for online resources, which deal with topics related to DEM. I have been heavily involved with computation fluid dynamics (CFD) so far, and I am relatively new to the field of DEM. In ...
0
votes
0answers
84 views

Parallel plate capacitor as simple superposition of Coulomb-fields

I am trying to calculate and visualize the electric field inside and outside of a parallel plate capacitor by assuming a uniform distribution of point charges on each plate and by adding up the ...
0
votes
0answers
59 views

Arnoldi Decomposition Algorithm

I try to get into GMRES via Arnoldi-Decomposition. For my understanding, I Implemented the Arnoldi-Decomposition in python. ...
0
votes
0answers
32 views

Why it doesn't matter to use velocity gradient or shear rate tensor to calculate wall shear stress?

The wall shear stress is defined based on Matyka et. al. eq. A.4: $$\vec{\tau} = 2 \mu (\mathbf{S} \cdot \vec{n} - (\vec{n} \cdot \mathbf{S} \cdot \vec{n})\vec{n})$$ Where $\mathbf{S} = \frac{1}{2} (...
0
votes
0answers
36 views

Why am I not getting the flat phase when Fourier-transform a Fourier-limited Gaussian pulse?

I have been trying to obtain a spectrum and a spectral phase of a Gaussian pulse using the Fast Fourier Transform provided with numpy library in Python. Here are ...
0
votes
0answers
131 views

Time-dependent Schrodinger equation implementation in FEniCS

For our Bachelors thesis we're trying to solve the Schrodinger equation $i\partial_tu = -\nabla^2u+Vu$ in FEniCS. Given the domain $[-5, 5]^2$ with an initial value of $u_0(x, y)=e^{(-2(x^2+y^2))}$ ...
0
votes
0answers
33 views

exploding gradients in gradient descent procedure of multi-output ridge regression

Multi-output ridge regression: $$W^{*}=\underset{W}{\arg \min } \frac{1}{\mathcal{N}}\|Y-WX\|_{F}^{2}+\lambda\|W\|_{F}^{2}$$ There are $Q$ outputs, $N$ samples, and $P$ covariates (features). $\hat{...
0
votes
0answers
38 views

Fastest way to find roots of second order polynomial upto single decimal point?

What is fasted way to find roots of second order polynomial up to single decimal point using a program.
0
votes
0answers
26 views

Normalized Coordinate system, Hermitian Cubic Shape function

How can I convert a local shape function given in terms of normalized/natural coordinates to global shape function in terms of x and y coordinate system in Hermitian cubic shape function. Please ...
0
votes
0answers
50 views

Are there unproblematic max constraints when modelling problems as Linear Programs?

Suppose we have a linear objective function that we want to maximize. All variables are from the set of reals. We have a constraint of the form: $$\max(x_1,x_2) + \max(x_3,x_4)\leq c\,, \text{ with } ...
0
votes
0answers
37 views

Pressure boundary conditions in Stokes Equation in 2D (Finite Volumes)

I am solving the steady-state incompressible Stokes equations in 2D: \begin{equation} \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} = 0, \end{equation} \begin{equation} \mu\left[\...
0
votes
0answers
43 views

Solve system of PDES

I need to solve the following system of partial differential equations \begin{align} \psi_{x} &= -i a \psi - b \phi,\quad &(1)\\ \phi_{x} &= b \psi + i a \phi,\quad &(2)\\ \psi_{t} &...
0
votes
0answers
65 views

Efficient inversion of multidimensional non linear function

I have a function $f:x\mapsto \vec{y}$ with $x \in [0,1]$ and $\vec{y}=(y_1,...,y_n) \in \mathbb{R}^n$. $n$ is a small integer e.g. $n=8$. Each of the component functions in $y_i(x)$ "oscilate" up and ...
0
votes
1answer
55 views

Global to local transformation matrix in 2D frame structures

In section 3.2 of this paper [1], where 2D planar frame structures are being analyzed, the authors mentioned a transformation matrix to be used in extracting the element displacement vector from the ...
0
votes
0answers
20 views

How to use the solution of a multistage stochastic program?

Given a multistage stochastic program, its solution (if it exists) consists of the first decision vector, as well as all the recourse decision vectors for all possible scenarios of an event tree. But ...
0
votes
0answers
63 views

A name for a numerical phenomena when using numerical methods

I have a nonlinear solver for equation $g= c_1f(x_1,y_1)+c_2f(x_2,y_2)$. Note that $c_1$ is much bigger than $c_2$. So after using Levenberg–Marquardt algorithm, I could only get $x_1$, $y_1$ and $...
0
votes
0answers
45 views

Propagation of a Gaussian beam using FFT

I am trying to simulate the propagation of a gaussian beam through a lens using an FFT approach. I tried to implement the approach described by Couairon in this paper at page 43: https://link....
0
votes
0answers
41 views

How to implement the gmres method using Householder transformation instead of the Gram-Schmidt?

For Generalized Minimal Residual method GMRES, we usually use the Modified Gram-Schmidt MGS to generate an orthonormal basis of ...
0
votes
0answers
54 views

Is it possble to do this complex symbolic calculation with Matlab?

Sorry it's bit abrupt, but recently I am caught up in some symbolic calcualtion which is tedious and almost impossible with mere human hands, so just wondering is it possible to solve the double ...
0
votes
0answers
69 views

Heat diffusion simulation in a 3D piston using FENICS

I'm trying to simulate the heat diffusion in a 3D piston. I marked the boundaries on GMSH. I have used a Dirichlet BC of 300 on the top face of piston. But the results look abnormal. There is a ...
0
votes
0answers
68 views

Comparison of diffusion time - theoretical value vs computed

This is a follow up to my previous post I've been trying to compare the diffusion time obtained from theoretical derivation(answered in my previous post) and what is obtained computationally, for a ...

15 30 50 per page
1
31 32
33
34 35
37