All Questions
334 questions
0
votes
1
answer
70
views
Computing a power diagram
I want to compute the power diagram of a set of points. When the d-spheres overlap, the solution seems straightforward. You construct the d-1 sphere made up by their intersection and then pass a plane ...
0
votes
1
answer
91
views
Is there a close form expression for the Fourier basis on a cube without complex values?
In the 1D case, there are multiple expressions of the fourier basis, some of which are sums of pure cosines and signs, without invoking euler's identity.
Is there a closed form expression describing ...
0
votes
1
answer
65
views
Sampling pattern for arbitrary regular polygons?
Assume you are given an integer $n$ and want to produce a sampling pattern with that many points on each side.
The square patterns is trivial, you just do n rows of n equidistant points at regular ...
0
votes
0
answers
128
views
Heat Equation for fast source with FiPy
I'm trying to solve the following differential equation with FiPy, basically laser irradiation on a surface
$$
\rho_{s}C_{p,s}\frac{\partial T}{\partial t} = k_{s}\frac{\partial^{2}T}{\partial x^{2}} +...
0
votes
1
answer
82
views
Efficient computation of arctan with square roots?
I need to convert n-dimensional vectors into hyperspherical coordinates, which involves doing calculating an arctan with an argument which is the square root of a sum of squares (i.e., the radius of a ...
1
vote
0
answers
41
views
constrained Delaunay triangulation algorithm starting, not ending, with constraints
Let $X$ be a collection of points in $\mathbb{R}^2$, and let $\Omega$ be a triangulation of the input point set.
A triangle $\{x_i, x_j, x_k\}$ encroaches on the point $x_l$ if $x_l$ is in the ...
0
votes
0
answers
55
views
How to smooth out noise of a mesh eigenvector?
I have computed the eigenvectors of the cotan Laplacian of a mesh. It looks like this:
I used ARPACK to get the output, as you can see, there's some lo level noise. What technique could I use to ...
0
votes
0
answers
31
views
How to use ARPACK's inverse shift mode
I am trying to get invert shift mode working on ARPACK, and I am interfacing the library through rust.
I am using this laplacian matrix for testing:
...
2
votes
2
answers
226
views
(Isoparametric) Mapping of physical coordinates to their equivalent parametric coordinates on a reference element
I have some experiece with finite element methods (FEM), in general. However, I mainly worked with Cartesian grids -- i.e. using orthogonal (non-curved) elements.
Recently, I became interested in a ...
3
votes
0
answers
53
views
Datasets for inverse heat transfer problems
I was wondering if there is an available, real-life known inverse heat transfer problem dataset to benchmark oneselfs algorithm, as in MNIST for deep learning. Talking about... (well in this case I ...
1
vote
1
answer
256
views
Coupled Partial Differential Equations
I'm trying to solve the following system of coupled differential equations, the two-temperature model for $e$ = electrons and $l$ = lattice.
$$
\rho_{e}C_{p,e}\frac{\partial T_{e}}{\partial t} = k_{e}\...
1
vote
0
answers
50
views
How can I apply a mixed boundary condition to a multi-material heat transfer problem using Crank-Nicolson?
I am working on a mixed material model for a melting material and need to enforce both a Dirichlet and Neumann type condition at the interface. Subject to an external surface heat flux at the top of ...
0
votes
0
answers
38
views
Thermo Hydraulic Mechanical modeling of energy wall slab in Comsol multiphysics
I am currently working on a complex simulation project involving an energy wall slab, and I need assistance in accurately modeling and validating it using COMSOL Multiphysics. Here are the details of ...
1
vote
2
answers
121
views
How to handle non bilinear weak form?
I solved the 2D heat equation using the finite element method. It all went well first with the adiabatic case, however problems occured when I introduced cooling with the enviroment.
I modeled the ...
2
votes
0
answers
112
views
Efficiently detect overlaying ellipses in distorted images
I'm currently facing the problem of efficiently detecting (special) ellipses in edge images. These images are given (i.e. previous image processing is impossible) and contain quite some noise. I need ...
3
votes
0
answers
151
views
Population of the coefficient matrix of a linear system Ax=b stemming from the finite differences of an arbitrary geometry
I've been looking into solving a linear system $$Ax=b$$ where $A\in\mathbb{R}$ is the sparse coefficient matrix of size $K\times K$, $b\in\mathbb{R}$ is the right-hand side (i.e., the source term) of ...
1
vote
0
answers
46
views
Find a set of positions of a rectangle of fixed size, which would "cover" a curve on a plane
I have a curve on a plane, and a rectangle with one side much longer than the other (let's say it is a "thick segment). I need to find a set of positions of the rectangle which would include all ...
1
vote
2
answers
115
views
Cover a 3D surface with 2D rectangles of fixed size, allowing overlap
I have a 3D surface, defined as collection of points in a 3D evenly spaced mesh. I have a rectangle of fixed size (height x width), and I need to find a collection of rectangles positions in the 3D ...
2
votes
1
answer
411
views
Where am I making a mistake in solving the heat equation using the spectral method (Chebyshev's differentiation matrix)?
I would like to numerically solve the following heat equation problem:
$$ u_t = \Bigg(2{a \over l}\Bigg)^2 u_{xx} \tag 1$$
$$ x \in [ -1, 1 ] \tag 2$$
$$ u(x, 0) = 0 \tag 3$$
$$ u(1, t) = A \sin \Bigg(...
2
votes
1
answer
350
views
Need help with the python code: Calculating Madelung constant CsCl crystal structure
Need help with the code to estimate the Madelung constant for CsCl lattice:
Cs at (0,0,0)
Cl at (0.5, 0.5, 0.5)
Answer: Converged value I am getting is 0.465. ...
3
votes
1
answer
152
views
Role of rotation's pivot point in optimization?
In this paper, the authors describe how to use locally rigid transformations (sampled on nodes in space) to deform mesh vertices. In the paper, rotations are relative to the pivot point, which ...
1
vote
0
answers
20
views
Order in a subset
Lets consider a range of "K" binary digit numbers. In that range, we want to take a subset of those values which have (<="n" consecutive 0s) AND (<="n" consecutive ...
0
votes
1
answer
50
views
How do you build a polyharmonic discrete system?
Polyharmonic equations, to my understanding, are defined as:
$$\Delta ^k u = 0$$
i.e. one repeatedly applies the laplace operator to the function a certain number of times and the result must be 0.
...
0
votes
1
answer
110
views
Computing discrete laplacian matrix for mesh fairing
I asked this question on the math stack exchange and got an answer, but I am just as utterly confused as before. My fundamental goal is to actually construct the matrix, that is, a series of steps I ...
1
vote
1
answer
65
views
Optimization: Find minimizer along linestring
Given some function f(x) and a set of points A representing a linestring (or polygonal chain), I am searching for the point on ...
0
votes
0
answers
61
views
Algorithm for 1-dimensional minimal surfaces
Consider a set of points. For simplicity, let's say that those are 2D points (although the problem works in higher dimensions as well). The goal is to find the minimum possible length of a connected 1-...
1
vote
1
answer
338
views
Why does scipy Conjugate Gradient solver fail to converge for non-steady heat equation using Crank-Nicolson method
Could someone please explain why my implementation of the Crank-Nicolson method applied to the non-steady heat equation won't converge? There shouldn't be any nonlinear aspects to my implementation ...
2
votes
0
answers
114
views
Efficient heat diffusion implementation with varying coefficients
I have the following heat diffusion equation:
\begin{alignat}{3}
\partial_t u(t, \vec{x}) &= g(\vec{x})\Delta u(t,\vec{x}), &\quad& \vec{x} \in\Omega, \, t\in(0,\infty],\\
\partial_n u(t,\...
0
votes
0
answers
39
views
Equilibrium position finding with DSM
I've coded a framework that can be used to simulate the dynamic behavior of a system discretized by particles (nodes) that are connected by spring-damper elements. However, I want to compare it to a ...
0
votes
0
answers
32
views
Parallel Block-Structured class abstraction for FDM
I’m currently developing a FDM/FVM (using contravariant coordinates) code using Fortran and Co-Arrays (SIMD, in general), and so far I have all sparse matrix (BiCGStab, working on AMG) solvers and ...
5
votes
1
answer
107
views
Prediction of sphere (i.e. roast) core temperature heated in an oven
The real-life problem
Assume I put a spherical roast with initially constant temperature of start_temp=25 (°C) into an oven with ...
1
vote
1
answer
308
views
2D Heat equation solved with finite element method converges in skewed way
I tried to solve the 2D heat equation with the finite element method, using triangles as elements. Currently generated by a Delaunay triangulation. The base function I'm currently using is basically ...
1
vote
3
answers
399
views
Partial derivatives for triangular meshes (in 3D)
A grid offers an obvious definition for the partial derivatives at a grid point, given
$x$ the value of a point $p$ in an $n$ dimensional grid, the forward partial derivative that point for coordinate ...
0
votes
1
answer
54
views
Finding maximums in mesh of graph?
I have a triangle mesh which is an approximation of a smooth graph. i.e. a scalar function of $xy$.
I am interested in finding extrema. One naive way I did it was to look at some number of points ...
0
votes
0
answers
171
views
Adding stability to MPM simulation?
I am writing a 2D implementation of MLS-MPM, I have fluids working perfetly fine, solids technically work as well, at low time steps.
This is the fluid simulation at a large time step:
https://i....
0
votes
1
answer
143
views
How to get a normalized gradient with FreeFem++?
I am trying to use FreeFem++ to solve the heat geodesics algorithm.
The algorithm is:
solve $\dot u = \Delta u$ at a specific time $t$.
compute $X = \frac{\nabla u_t}{|\nabla u_t|}$
solve $\Delta\phi ...
5
votes
2
answers
148
views
Suggestions for libraries that can numerically compute geodesics from a given Riemannian metric?
I am dealing with a non-trivial Riemannian metric $H$ defined on a particular subset of Euclidean space ($E \subset \mathbb{R}^n$). I was able to show the Riemannian manifold $(E,H)$ is geodesically ...
2
votes
1
answer
139
views
Computing numerical derivatives
I am trying to create a sweeping surface, for which I need the frenet frame of a curve. I am trying to compute this for arbitrary curves but for testing I am just using the parametric unit half circle....
1
vote
0
answers
115
views
Accuracy of the Crank-Nicolson method for non-linear, inhomogeneous heat equation
I am currently coding a solution to the following PDE:
$\frac{\partial T }{\partial t} =\frac{\partial}{\partial \theta}(A(\theta ,\phi )\frac{\partial T }{\partial \theta}) +\frac{\partial }{\partial ...
2
votes
0
answers
272
views
Delaunay-based isosurface extraction vs marching cubes
I recently tried the isosurface extraction algorithm provided by the C++ library CGAL. This is new to me. It is based on Delaunay triangulations.
I have some experience with the marching cubes, I ...
2
votes
0
answers
113
views
Conceptual doubt regarding 2D conjugate heat transfer modelling (COMSOL and Mathemtica)
I have been dealing with some conceptual flaws in my understanding of modelling, which I will elaborate herein. I am modelling conjugate heat transfer of a reciprocating fluid, which flows with ...
1
vote
0
answers
72
views
Maximal "Convex Augmentation" of a Triangle in 2D Mesh
Consider a convex polygon in $\mathbb{R}^2$ with multiple convex holes in it and suppose that, for now, we have a 2D triangular mesh of the polygon, which is represented by $\mathcal{T} \equiv\{T_i\}...
4
votes
1
answer
264
views
Selecting most points from a set of points with distance constraint
I am looking for an algorithm to select the largest subset of $M$ points from a set of $N$ points ($M < N$) such that no point is within a certain minimal distance d to any other point in $M$? I ...
1
vote
2
answers
71
views
robustness of geometric predicates in Euclidean vs homogeneous coordinates
The signed volume of the triangle formed by the points $p, q, r$ in the plane is defined to be
$$\text{volume}(p, q, r) \equiv \det\left[\begin{matrix}q_1 - p_1 & r_1 - p_1 \\ q_2 - p_2 & r_2 -...
0
votes
0
answers
145
views
Open source implementations of the medial axis transform for vector shapes
Are there any open source implementations of the medial axis transform for vector shapes?
I have searched without finding any useful results. It seems that CGAL library doesn't have it implemented nor ...
2
votes
0
answers
43
views
How to generate coordinate points of a smallcircle on earth
I am looking up celestial navigation, and according to
https://youtu.be/-ARXW8InStY?t=3320
a specific sun angle reading (sun angle above the horizon) will be the same on a small-circle with the centre ...
1
vote
0
answers
51
views
Difference between Numeric, Combinatorial, and Geometric Computing
In the paper [1], author has discussed a distinction between the 3 types of computations: numeric, combinatorial, and geometric. The author says that Geometric computation is one that has elements of ...
0
votes
1
answer
148
views
Problem with my Octave code (unsteady heat equation with FEM)
I want help with my Octave code regarding the unsteady heat equation.
My geometry and mesh are generated with FreeFEM++, so there is no problem with that (I tried it with the steady problem with no ...
2
votes
1
answer
101
views
Min supporting line of a set of points
I am following along Rourke's book and I am trying to do the excercies mentioned in this SO post:
Min supporting line for a set of points
Design an algorithm to find a line 𝐿 that:
has all the ...
0
votes
1
answer
113
views
Aerofoil study using CFD, struggling to find aerofoil coordinates
I’ve been messing around with Ansys and I’m struggling to find the aerofoil coordinates for a NACA 66-012?
I looked on Airfoil tools, but it doesn’t allow you to generate a 6 series aerofoil, only 4 ...