instruction stringlengths 43 28.1k |
|---|
Assume we have two domains $\Omega_a$ a acoustic domain with boundary $\Gamma_a$ and $\Omega_s$ a domain of a solid body with boundary $\Gamma_s$.
$\Omega_a$ and $\Omega_s$ have the common interface $\Gamma_{as}$.
In $\Omega_s$ we have the equation of motion for a solid:
\begin{equation}
\rho_s \frac{\partial^2 u}{... |
I'm solving a system of multispecies ion exchange equations (diffusion+drift fluxes) in 1-d spherical domain using finite volume method to obtain the ion concentrations at the next time step. After polishing the generic equation with so many assumptions, I ended up with this equation for species A
\[\frac{{\partial ... |
Finding the saddle point of a constrained zero-sum two-person game is equivalent to a resolution of primal-dual programs (with bi-linear objective function).
I am looking for a free solver to compute the saddle point in the constrained zero-sum two-person game (in primal-dual programs with linear constraints and biline... |
How to get 10 in computer science, using the number 4 exactly four times, and two signs exactly and two operation + exactly ?
|
I'm trying to figure out how to create a surface mesh from a set of labeled 3D points. The 3D object could be something like part of a cave system or asteroid where there would be parts of the surface not visible from looking on the outside. Each point has a radius and not all points are on the surface. The output shou... |
Given an $m \times n$ matrix $A$ and a vector $x\in\mathbb R^n$, with $m<n$, what's an efficient way of computing the projection of $x$ onto the kernel of $A$?
|
https://stackoverflow.com
Krylov solvers for iterative computation of the smallest singular value and the corrensponding singular vectors of a matrix
Edit:
This is a follow-up question to How to implement flexible gmres in matlab?.
I am a student and I am working for the topic of "Krylov solvers for iterative computa... |
I am working on a problem with very large sparse matrices. I'd like to compute $A^{-1} B$, that is a crucial part of converting DAE to ODE (and there is no workaround). Here size of $A$ is 2E+5 x 2E+5 with 0.7% density (especially all diagonal entries are non-zeros). And $B$ is 2E+5 x 1E+6 whose density is only 1E-6.
I... |
For stable time steps for the RKDG method for transport equations we require that
$$
\Delta t \le \frac{\Delta x CFL}{(2k + 1)|\lambda|},
$$
where $\lambda$ is the eigenvalue of our conservation law and $k = 0, 1, \dots$. For diffusion I believe we require that
$$
\Delta t \le \frac{\Delta x^{2}}{\nu},
$$
where $\nu$ ... |
In Fourier Optics one often needs to compute approximations to bivariate integrals like
$$
\int_{-\frac{l}{2}}^{\frac{l}{2}}\int_{-\frac{l}{2}}^{\frac{l}{2}} {\rm e}^{i\phi(\xi,\eta)}\mathrm{exp}\left[i\frac{\pi}{\lambda d}\left((x-\xi)^2-(y-\eta)^2\right)\right]{\rm d}\xi{\rm d}\eta
$$
These integrals generally reduce... |
Consider the following function :
$$f(x) = \sin^2(\frac{π\Gamma(x)}{2x})$$
Now consider the following functional :
$$I(x)=\int_0^\infty \frac{f(x + iy) − f(x − iy)}{e^{2πy}-1} dy$$
I need values for of $I(x)$ for large $x$ at least upto 10^2.
I tried it on Mathematica but I couldn't .
Here are some calculated value... |
I have installed openFoam on Debian GNU/Linux and learning from official user guide. I have a problem with generating streamlines. I am trying to generate streamlines as explained in the post processing section (look at 2.1.4.5 Streamline plots).
The configuration setup explained is as follows:
And the expected outp... |
I am writing the code relate to math.
There is some complicated math formulation in the project.
Directly writing the calculation code leads to hard understanding; thus I want to comment on the formulation.
I want the comment can be readable, and easy for understand.
I know we can save the formulation in another docume... |
My background: I have taken some courses on numerical analysis during my PhD and read a few books on the topic as well. I mostly work on low Reynolds number fluid mechanics and use boundary element method for solving Stokes equations on unstructured meshes. I mostly read the mathematical equations and write my own code... |
The directed 3-Cycle cover asks for a vertex-covering set of oriented cycles with at least three vertices per cycle such that every vertex is covered by exactly one cycle.
I have scrutinzed the internet for some time for freely availabe benchmark problems but couldn't find anything useful.
So my question is where I can... |
I have a 1D convection-diffusion equation $\sigma_t = a(x,t) \sigma_{xx}+b(x,t)\sigma_x+f(x,t)$ defined on the unit interval, with nonzero Neumann boundary conditions at both ends. It should be noted that the coefficients are not strictly positive, which explains the negative Peclet number below.
From what I understand... |
https://www.jstor.org/stable/pdf/2157482.pdf, here I have a problem in last equation of (2.6) in section (2.1). When they are considering error equation on the interface $\Gamma$ they get $e_v^{(n)} = \delta_n$, where $\delta_n = \lambda_n - \lambda_{n-1}$(Here I use there definition of $\delta_2 = \lambda_2-\lambda_1$... |
Simple paraphrase of my question is what is the best way to use a table or curve as an input for an optimization problem in Gekko (and/or AP Monitor)?
For example, I have simplified atmospheric density data by altitude. I can fit the data to a a cubic spline in hermite form (slopes at control points are given explicitl... |
I am trapped here for a long time. I wrote a toy Matlab FEM code. I want to run the follow simulation.
Mesh
Suppose we have a cube, and we divide it into subcube along $x,y,z$ axis, then each subcube be divide into 5 tetrahedral elements. The cube along $x,y,z$ axis is divide into $n_x,n_y,n_z$ node, respectively. So t... |
I am trying to solve an equation of the following type
$$\partial_zE(z)=-c_0J$$
with $$J=c_1\beta E^3(z)$$
using the boost::odeint-framework and a fixed time stepper, with $c_0$, $c_1$ and $\beta$ constant values.
The right hand side of the function is calculated by the following procedure (depending on the step size $... |
I'm writing a solver for Boltzmann Equations (BE) including a force term in rarefied plasma, for my PhD. The aim is to see if an instability occurs inside an electric streamer (theoretically it should, basing on the analysis of the dispersion relation).
I used finite differences method with MPI parallelization, but the... |
I have a question about the Markov Chain Hamiltonian Monte Carlo (MCHMC).
Hamiltonian Monte Carlo is known as Hybrid Monte Carlo too. I'll describe the steps of the algorithm.
We have at the beginning a coordinates configuration {$q_i$} and generate momenta configuration {$p_i$} from a gaussian distribution at the des... |
I am in a context of forecasts in astrophysics. Don't be too rude if questions seem to you stupid or naive but rather indulgent, I am just looking for better undertsand all these numerical methods of Monte-Carlo alone/ Monte-carto coupling with Markov-Chain and the difference between a sampler and an estimator. This is... |
Consider a potentially high-dimensional (say, $N$ up to 20) integral of the form
$$
\int_0^\infty \rho_1(x_1)\rho_2(x_2) \cdots \rho_N(x_N) \bigg(x_1+x_2+\cdots+x_N -K\bigg)^+ \, dx_1 \cdots dx_N.
$$
where $(z)^+ = \max(0,z)$ is the positive part of the argument $z\in \mathbb R$, $K \in \mathbb R_{>0}$ and all $\rho_m... |
I am simultaneously trying to learn computational physics methods, chaos, and C++. I think this is the right site for the question, and I apologise if not.
I started working through Thijssen's Computational Physics textbook, and the first question (exercise 1.1b) is to solve the Duffing equation,
$$
m\ddot x = -\gamma\... |
I am learning about multigrid methods from the textbook section 6.3 Multigrid Methods, which shows a geometric multigrid algorithm for 1-D examples in detail, including how to build restriction/interpolation matrices (i.e., eqs.1, 3) and how to get a coarse coefficient matrix (eq. 6).
I realize that these matrices and ... |
I am trying to solve the Poisson equation numerically using the FDM method in C++. But I have a little confusion with the iterative process. I understand that the number of iterations should go until the solution converges, but how to calculate if the error is greater/less than the tolerance level? Here is a small piec... |
I have a function
$$
f(z) = \frac{1}{(z-z_1)(z-z_2)(z-z_3)(z-z_4)}
$$
All of $\{z_1,z_2,z_3,z_4\}$ are simple poles. The residues
for this function are given as
$$
\text{Res}(f(z),z_i)= \lim\limits_{z\to zi} \frac{(z-z_i)}{(z-z_1)(z-z_2)(z-z_3)(z-z_4)}
$$
For example to find $\text{Res}(f(z),z_1)$ one first cancels the... |
The Q2-P1 element is one of the popular finite elements for incompressible flow problems in the mathematics community. For this element, the velocity field is approximated using bi-quadratic shape functions and the pressure field using linear shape functions. What makes this element pretty odd is the fact that the appr... |
Let $A$ be the well known tridiagonal matrix coming from the 1D Finite difference discretization of the Laplacian, with stencil $\frac{[1 \quad-2 \quad 1]}{h^2}$.
The system $Ax = b$ is very large, so an iterative method must be used. Also, it is symmetric and positive definite, so I could employ PCG to solve it. The b... |
Can you provide a jargon-free (as much as possible) explanation of what is meant by "dense ODE systems", and "sparse ODE systems"?
Some hints I have gotten from Googling:
dense ODE systems' computation cost increases quadratically with the size of the system
sparse ODE systems' computation cost does not correlate wit... |
I want to compress an array of time series floating point data as much as possible.
Currently the only algorithm I've found for this is XOR compression which works well, but doesn't compress the data enough. What is the highest compression ratio algorithm for relatively smooth time series floating point (double precisi... |
I have a point $y \in \mathbb{R}^d$ and a convex polytope $\mathcal{P}$ given as the intersection of half-spaces:
$$\mathcal{P} = \{x \in \mathbb{R}^d \mid a_1 \cdot x \le b_1, \dots, a_n \cdot x \le b_n\}.$$
I would like to project $y$ onto the polytope, i.e., to find the nearest point $z \in \mathcal{P}$: in other wo... |
I apologize in advance if this post is at all ignorant or elementary, I am a pure mathematician who is newly getting into the world of scientific computing.
For my research, my advisor would like me to analyze a few 3d numerical simulations in C++ all of which are in a VTK format. To be more specific, we are modeling f... |
I implemented a solver for the 2D steady-state heat equation (without heat generation and homogeneous material) $\nabla. (k\nabla T) = 0$, using finite volume method, however, I am having some confusion about flux direction and face normal.
First, using divergence theorem (applied to a mesh element): $$\int_V \nabla. (... |
What are the pros of Fourier-Galerkin spectral methods while solving PDEs?
Here's the one that came in my mind first:
Easy implementation: using this method, differentiation operator computation is really simple since
$$\partial^p\hat{u}_k=(\imath k)^p\hat{u}_k$$
Exponential convergence: let $u \in C^m$ the exact solu... |
I have a short question about Time evolving block decimation (TEBD). During a lecture I was told that this method is very efficient in evolving 1D quantum spin systems with only nearest neighbor interactions. Unfortunately no one bother explaining why this algorithm is so efficient in this case and what exactly its lim... |
I have a physical model which takes $\sim50$ parameters and gives $\sim2000$ outputs taking tens of minutes to run. I need to optimize these parameters to give outputs as close as possible to data. The problem of course is that it is expensive to evaluate and, probably worse, that there are so many parameters.
The best... |
I have found a toy implementation of RK-Dopri(4,5), written in Python.
I am concerned however, about line 118:
y = y + h * (b1*K1+b3*K3+b4*K4+b5*K5+b6*K6)
Has the term b2*K2 been omitted on purpose? I have a feeling that it is not, given (1.8) in Hairer, Wanner and Norsett:
Can you confirm?
|
I have a question about implementing traction boundary conditions in 2D and 3D linear elasticity. Consider the picture above. I want to apply traction boundary conditions on the boundary in red. My question is: How is the node order/connectivity for the traction elements defined? In 2D the boundary term $({\bf{w}},{\b... |
I was wondering if anyone could enlighten me about the convergence properties of the truncated newton method in case of a non-positive definite hessian $\nabla^2 f = H$. From the Book 'Numerical Optimization' from Nocedal & Wright, the Algorithm consists of two loops, one inner to compute the (Newton-)search direction ... |
I have used different variants of the Laplacian operator (div grad) using 4, 8, 12, 20 and 24 of the closest points. I get problems due to the chosen coordinate system and the discretization of the Laplacian operator. See images originating from circular symmetric seeds:
It is implemented as https://www.shadertoy.com/... |
Consider the following stochastic differential equation
\begin{equation}
dy=\left(A-\left(A+B\right)y\right)dt+C\sqrt{y\left(1-y\right)}dW\tag{1}
\end{equation}
where $A$, $B$ and $C$ are parameters and $dW$ is a Wiener increment.
Equation $(1)$ will be our point of reference in what follows.
Now, first let us cons... |
I am trying to model a linear elastic material in Abaqus using a UMAT. For my application, I need to rotate the 6x6 compliance matrix for a given set of eigenvectors (or a rotation matrix). I came across a thread titled "debugging a rotation matrix for elastic constants" where this theory was explained in very good det... |
I use python for my algorithm which uses only one core and I need more processing speed.
I have i7 6700K CPU with 8 cores. How to convert them to one core to have a total performance of 8 cores?
Multiprocessing and multithreading python modules don't fit in my case.
|
Background
In solid fem, we often solve $$\mathbf{Ku}=\mathbf{p}$$
where $\mathbf{K}$ is global stiffness matrix, $\mathbf{u}$ is displacement, $\mathbf{p}$ is global load vector.
If displacement not be constrained, equation above can not be solved, because the system can have rigid body motion.
In 2D case, the rigid b... |
I parallelized my code with openMP, and now have this bug in my code that's really odd. If it's the first time I run on a computer, it segfaults, but if I run the program again it runs fine. I've never seen anything like this and was curious if anyone has seen this before or has good resources or hints on how to fix th... |
Please excuse me if this question somehow looks trivial or not really interesting, but I recently have a hard time to convince someone else that my algorithm for constructing a self-similar binary structured-tree (read more here: https://doi.org/10.1002/cnm.3229) is correct. So, the algorithm is summarized in these 4 s... |
I have an objective function F: Nx1 -> Nx1, where N>30000. There are many sparse matrix/tensor multiplications in this function, so taking an analytic Jacobian by paper and pen is cumbersome.
Which (AD) tool should I use to compute a sparse Jacobian as fast as possible? If needed, I am ready to rewrite my code from Mat... |
Half the run time of my code right now is evaluating a big function over many, many points, it takes maybe about 20 seconds per evaluation
The function consists of a bunch of simple operations that look like
Ux = ((1./72).*(x.^2+y.^2+z.^2).^(-5./2).*((-5).*x.*(4.*x.^4+3.*y.^2.*( ...
y.^2+z.^2)+x.^2.*(7.*y.^2+z.^2)).*... |
I have a matrix $M$ with non-negative real entries, and I would like to minimize the objective function
$$\Phi(v) = \|Mv\|_\infty,$$
where $v$ is constrained to be a probability vector, i.e., $v_1+\dots+v_n=1$ and $v_i\ge 0$. Is there an efficient algorithm for this?
Motivation. This comes up in solving a two-player g... |
I am just learning (more) about automatic differentiation (AD) and at this stage it kind of seems like black magic to me. The second paragraph of its Wikipedia article makes it sound too good to be true: it is extremely fast and is exact (no round off, no discretisation). I am left wondering why finite difference (FD) ... |
Before jumping into my question, let me contextualize it.
I'm doing numerical simulations of a Helmholtz scattering problem
$$\Delta p + \kappa^2 p = 0\, .$$
The incident pressure wave $p^{inc}$ will be scattered by some obstacle on the boundary $\Gamma_{obstacle}$ such that $p = p^{inc} + p^{sc}$.
From the literature,... |
I have a sparse matrix $W$ which is almost-squared ($N+1 \times N$) and I would like to know the eigenvalues of $A = W^T W$. $A$ is Hermitian so the eigenvalues are real-positive valued.
The usual approach would be to do svd(W), but I found no GPU SVD sparse implementation. I'm working in python but I'm good with any l... |
I'm dealing with a problem as follows:
I have a finite set of money to spend over different raffles, and I need to spend approximately to my budget, with the goal of maximizing my probability of my total winnings across all raffles being a constant . Each raffle has a different prize amount , and there is a certain ... |
I wrote a 2D-FEM solver to solve some diffusion process and wanted to verify my code with a test problem.
The input was $f(x,y) = x^2+y^2$ and I applied the stiffness matrix on it to get $\Delta f = 4$.
The lumped mass matrix $M$ and stiffness matrix $D$ are assembled from an analytical solution of triangles.
Unfortuna... |
I have written a program to solve for Newton's 2nd Law of motion for a given force law, in 2D polar coordinates.
It is known that if the force law is of the form $k/r^2$,we get conic sections as solution(https://en.wikipedia.org/wiki/Kepler_problem).
But when I run the program, I get a spiral trajectory (which isn't on... |
I asked this question on the Computer Science stack exchange (https://cs.stackexchange.com/questions/128710/faster-computation-of-ke-x-h2), but it appears that it is more appropriate in Computational Science stack.
Essentially, I want to compute $$f(x) =\sum^n_{i = 0} k_ie^{-(x - h_i)^2},$$ where $n \geq 0$ and $k$ and... |
How would you approach a standard convex quadratic problem with convex constraints but one non-convex term ? Say $|x|^{0.4}$.
$$\min_x \frac{1}{2} x^{T}Qx + g^Tx + c^T \mathrm{sign}(x) |x|^{0.4} $$
subject to $$Ax\leq b$$
Where $|\cdot|, \mathrm{sign}()$ are element-wise.
Is there any other way to solve the problem w... |
I am working on developing a topology optimization solver based on the finite element method and I want to add a triangular shell element in it. I used the classic finite element method but I didn’t separate in-plane and off-plane strains. My strain-displacement matrix consists of the following:
$$
B_i=\left(
\begin{ar... |
Currently, I am solving a problem in the format:
$$\min_X X^TGX \\ s.t. \vec{1}X=M,x_i\in\{0,1\},\forall x_i\in X$$
$M$ is an integer as well. The problem that troubles me is that $X$ is a vector in $\{0,1\}$ with a size of $7000$. I use the solver in https://github.com/oxfordcontrol/miosqp. It seems they are using the... |
The main references of mesh generation methods in computer graphics (CG) I found are discrete Differential Geometry [1] and a famous book "Polygon Mesh Processing" [2], while the "Handbook of Grid Generation" [3] is the main reference book of scientific computation mesh generation. I found that few people who do mechan... |
I am used to running calculations on a server/cluster, and we have used both PBS and SLURM. However, I am looking to run some calculations on my local machine. I would like to be able to schedule my jobs so that they run more efficiently. Does such software exist for macOS? Ideally it would be free. Please let me know ... |
I am struggling to recombine the remaining triangular cells into unstructured quadrangular ones in this geometry using Gmsh. Do I need to add auxiliary lines somewhere or do some geometries just don't allow these type of cells?
The .geo script:
// Gmsh project created on Wed Jul 29 13:32:48 2020
SetFactory("OpenCASCAD... |
I'm a PhD student in genetics and molecular biology working on an algorithm to identify if a DNA sequence is either a transposable element (TE) or not a TE using convolutional neural networks, and it's already working kind of the way I'd like it to (of course I'm always trying to improve it).
The input is a FASTA file ... |
I want to interpolate a vector field inside convex polygons in a polygonal mesh.
For triangular meshes the scheme uses a piecewise constant interpolation in the triangle, discretized at the center of the triangle.
I am especially interested in interpolating the gradient of a scalar field on the vertices, so feel free t... |
I am sorry if this question seems like off topic or opinion based, but I was not sure how to go about it.
I am currently working on a 100k x 100k positive definite linear system and trying to solve it using Cholesky factorization from Scalapack 2.1.0 (pdpotrf). My problem is that when I run the same system for 50kx50k ... |
Suppose we want to solve an FEM problem in terms of HPC. What is the most usual way to do it:
Using an open-source software like mfem,deal.ii etc.. or,
Assembly the system by your own(read mesh file,create stiffness matrix etc..) and use a high performance software like hypre,PETSc to solve it.
|
I have a simple Matlab script which aims to compute $k$ singular values of a matrix $A$. $A$ is a random dense square matrix of size $5000\times5000$, with 100 of its singular values constrained to be 0 (though that last detail does not seem to matter for my question).
I'm doing this in Matlab via [Uk, Sk, Vk] = svds(... |
Isogeometric analysis [1] has the advantage of integrating geometric and mesh models using NURBS or Spline. At the same time, I would like to ask a question to my friends: for traditional FEM and FVM, why can't we use mesh to represent geometry and use the mesh which represents the geometry to do the computation direct... |
I'm trying to plot Lotka-Volterra Equations using Python. I am a real beginner when it comes to Python.
I have these two equations:
$$\frac{dR}{dt}=\alpha R-\gamma RF$$ and $$\frac{dF}{dt}=-\beta F+\delta RF$$
I have also rewritten these equations into an iterative formula:
$$R(t+\Delta t)=\alpha R(t)\Delta t - \gamma ... |
Is the Immersed Boundary (IB) method considered a Direct Numerical Simulation?
A DNS code is the most detailed type of simulation and the most accurate but computationally expensive, right?
What makes a simulation not a DNS?
|
I'm trying to implement Singular Value Decomposition (homework of sorts) via the Jacobi Rotation method (more info here, pages 11 and 12).
I am stuck at the bullet saying (sorry for the picture, but I'm not too familiar with writing formulas... yet):
I know how to find the sine and cosine which rotate a vector (say, a... |
Suppose that we don't know $n \times n$ matrix $A$ explicitly but we are only able to compute products $Ax$ where $x$ is a column vector with $n$ elements. Is there an algorithm to determine whether $A$ is singular?
|
I would like to solve the following equation
$$\frac{\partial^2 y}{\partial t^2} - c^2(x,t)\frac{\partial^2 y}{\partial x^2}=0,$$
for $y=y(x,t)$ numerically. The wave speed, $c(x,t)$, is of the form
$$c(x,t) = \begin{cases}
c_1(t), & x<0 \\
c_2(t), & x\ge 0.
\end{cases}$$
The initial conditions are
$$y(x,0)=f(x),$$
$$\... |
I am looking for a package which can solve (non-linear) least squares problems without the use of derivatives (because of an expensive model), but which also deals with ill-conditioning well (such as when the Jacobian is sparse).
For example, the DFO-LS (Derivative-Free Optimizer for Least-Squares) solver documentation... |
Question
When it is about solving a system of equations, is it possible to predict that whether high-frequency noise (e.g. checker-boarding) is likely to appear in the converged solution by looking at coefficient matrix attributes (e.g. definiteness, etc)? What solver types are less likely to result oscillations, direc... |
In the FEM, there are certain applications in which the condition number $(\kappa)$ of the overall global stiffness matrix $(A)$ is computed or reduced by some preconditioner $(P)$. Are there any applications where the condition number of the tangent stiffness matrix for a single finite element (or some subregion) in t... |
I have the following equation (the Kurz-Giovanola-Trivedi model [1])
$$
v^2 \frac{\pi^2 \Gamma}{P^2 D^2} + v \frac{mC_0(1-k)\xi}{D[1-(1-k)Iv(P)]} + G = 0,
$$
where $Iv(P)=P \cdot \exp(P) \cdot E(P)$, $P=\frac{Rv}{2D}$, $E(P)=\int_{P}^{\infty} \frac{\exp(-x)}{x} dx$ is the exponential integral function, $\xi=1-\frac{2k}... |
I am trying to solve a set of linear PDEs of the form
$$F\left(\vec{y},\frac{\partial \vec{y}}{\partial x},\frac{\partial^2 \vec{y}}{\partial x^2},\frac{\partial \vec{y}}{\partial t}\right)=0.$$
To solve it I am using the method of lines where I discretize in $x$ to get a set of differential-algebraic equations (DAEs) ... |
For finite dimensional symmetric positive semidefinite matrices $A$ and $B$, I would like to solve
\begin{align}&\min |X - A|_1 \\
&\text{subject to}\\
&X \preceq B \\
&0 \preceq X\end{align}
Here $|\cdot|_1$ is the nuclear norm/trace norm defined by $|X|_1 = \text{tr}(\sqrt{X^*X})$, where $X^*$ is the conjugate trans... |
I am trying to solve the Poisson equation for Heterostructures using SOR. The equation to solve looks lik
I have discretized the Poisson equation using finite difference and my code is written in FORTRAN 90. I have the following questions.
Is it correct to apply SOR to above equation (I have discretized the 2nd order... |
I have this idea in my mind that Direct Numerical Simulation (DNS) is only used in research since the Reynolds numbers of industrial applications are too high and require computer horsepower we don't have yet. Is that still true nowadays?
Any reference on the subject?
|
I am solving the Poisson equation for heterojunction using Fortran90. I use the SOR algorithm to arrive at the potential profile.
I see the weird behavior where the error (the difference between the $n$-th and $(n-1)$-th iteration of the solution) abruptly falls to zero when the error reaches 1e-7 range. Is this behav... |
What are some alternative algorithms to creating a bounding box for finding the max width of a concave, simple winding polygon, like the one in the below image? I prefer solutions that are more performant when implemented programmatically, even if they sacrifice some accuracy.
I am trying to calculate the max width of ... |
Although there are many algorithms to construct Voronoi diagram, some of them are faster than others. Based on my knowledge Fortune algorithm is fastest for construct Voronoi diagram either in two dimensional or three dimensional. I search many forums but can't find any Fortune algorithm(Fortune's algorithm) code or a ... |
I have been looking into simulations of phase separation in variants of the Cahn-Hilliard system and have been running into issues with implementing no flux boundary conditions on certain variants.
The Cahn-Hilliard (C-H) Equation here is:
$$\partial_t \phi = -\nabla\cdot\textbf{J}$$
$$\textbf{J} = -\nabla\mu$$
$$\mu =... |
I am trying to solve the 1-D heat equation numerically with a variable source term. The system is basically a tank containing styrene in which it polymerizes to liberate heat. I have assumed that the cross-section of the tank is much smaller compared to the length so any variations in the y and z directions can be negl... |
I have been given a few numerical simulations regarding fluid mixing and have been asked to extract a few parameters from them using C++. Altogether there are about 1000 VTK files per simulation, and there is one simulation per time step, each to be analyzed separately. Regarding the problem itself, as a result of flui... |
I have tried to solve 1-D Conduction Steady state heat transfer problems in Matlab (see below).
Here is the 1-D model:
T''[x] == 0, T[0] == 100, T'[100] == 0
Analytical Solution:
T[x] = 100 for x: [0, 100]
I am so suprised that so many iterations (2,500,000) are required for a correct solution (here:T=100 for every n... |
I must solve the following second order differential equation:
$\delta \phi^{''}_{\mathbf{k}}+(3-\epsilon)\delta \phi^{'}_{\mathbf{k}}+\left(\frac{k^2}{a^2 H^2}+\frac{V_{,\phi\phi}}{H^2}-6\epsilon +4\epsilon\eta -2\epsilon^2\right)\delta \phi_{\mathbf{k}}=0;$
which is that of scalar field perturbations at linear order ... |
A Voronoi diagram is a kind of tesselation that divided the medium into polygons in 2D and polyhedrons in 3D.
Although there are many algorithms to construct a Voronoi diagram, some of them are faster than others. Based on my knowledge, Fortune's algorithm is fastest to construct the Voronoi diagram either in two dimen... |
The well-known method for solving multi-physics time-evolution problems
called "the method of fractional steps" or "the method of splitting" usually applies to PDEs which have a sum of terms on the right-hand side, and basically it consists of using partial updates, one term at a time. So for a PDE
$
\partial_{t} f = ... |
I would like to know how can I generate a collection of random 2D closed smooth curves.
I thought about generating a random 3D surface with random peaks, and then intersecting the Z=0 plane with it, and extract the largest contour, for example. I just not sure how to do it practically... it is the correct way? I would ... |
Is the change in time step necessary for the grid independent study? As the CFL is based on the relation between dt and dx.
In mesh independent study, only change should be mesh i.e, dx isn't it so?
|
I want to evaluate the Birch-Murnaghan Equation of State (BM-EOS) for different volumes.
I tried declaring a 1D array A in which every element would be the answer of BM-EOS for different volumes.
B0P = 4; B0 = 30
V0 = 36; E0 = -535; R4 = -535
array A[400]
do for [i=1:400] {
A[i] = E0+(9/8*B0*V0)*((V0/((((i/100)**3)/10... |
Based on my readings this is what I have gathered:
Dimensions: Number of data points in the x, y, z directions
Spacing: Space between points in each dimension
Origin: Location of origin
Cell data: Number of total points
I must have a misunderstanding somewhere, as the file I am working with has dimensions 13 13 13, yet... |
I'm computing the Hartree potentials of atoms by solving the Poisson equation and I use hydrogen atom as a test case. The Poisson equation for hydrogen atom in atomic units is given by
$$\nabla^2 V_H = -4 \exp(-2 r)$$
where $r = \sqrt{x^2+y^2+z^2}$.
The numerical solution of $V_H(x,y,z)$ with $z=0$ is illustrated in th... |
Apologies if this isn't the appropriate forum for this question.
I have a set of elements that I need to iterate over as part of a modeling workflow. The elements exists over a set of dimensions (i, j, k, l). Due to model constraints, most of the elements within the set are not considered (value = 0). Therefore, loo... |
I am writing a code to calculate mesh quality stats such as: cell volume, face areas and non-orthogonality between faces (basically something like OpenFOAM's checkMesh).
As per F. Moukalled et al, a mesh is skewed when the line connecting adjacent cells centroids does not pass through the centroid of the straddling fac... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.