Skip to main content

Questions tagged [grid]

For questions about solving numerical problems by evaluating over a discrete grid of points in the problem domain.

Filter by
Sorted by
Tagged with
1 vote
0 answers
101 views

Can I reduce my simulation error with a staggered grid, postprocessing and compatibility equation feedback?

What I did Using the finite difference method, I solved with a certain amount of error the following system of hyperbolic partial differential equations in cylindrical coordinates (the problem is ...
FriendlyNeighborhoodEngineer's user avatar
2 votes
1 answer
92 views

Creating nonuniform grids for FDM with multiple points of concentration

If I am creating a grid in the $S_i$ direction with $N_S+1$ grid points. If I want more steps around some $K$, I can use: $$ S_i=K+c \sinh \left(\xi_i\right), \quad i=0,1, \ldots, N_S $$ where $c=\...
THAT'S MY QUANT MY QUANTITATIV's user avatar
0 votes
0 answers
22 views

uniform refinement is not working in gmsh

I get 0 node and elements when I use -refine command line flag in gmsh. Explicitly writing RefineMesh; in the script produces the original mesh and not a refined one. Am I missing something while ...
Ashb's user avatar
  • 11
0 votes
0 answers
68 views

Algebraic Grid Generation

I am new to the topic " Algebraic Grid Generation". I want to find a simple example where we solve the host equation, let us say the heat equation, numerically in the computational domain ...
Mahmoud Saleh's user avatar
0 votes
1 answer
46 views

Grid walk vs. uniform random weights for bounded grid

I want to sample from a bounded space, say $[0,1] \times [0,1] \in \mathbb{R}^2$. I have read about a so-called grid walk that fixes a starting point $x_0 = (x_{0,1}, x_{0,2})$ and then proceeds via $...
KeynesCoeFen's user avatar
1 vote
0 answers
119 views

A staggered grid for an eigenvalue problem (linear stability analysis)

I'm interested in extending the concept of a staggered grid (commonly used to solve the incompressible Navier-Stokes equations) to a linear stability analysis context. For example, we can consider ...
Samantha B.'s user avatar
0 votes
0 answers
34 views

boundary condition at rotation axis of a spherically-symmetric system

The quantity I am interested in is not the rotation rate $\Omega$, but I will use this quantity nonetheless to make the problem clearer. I am interested in a spherically-symmetric system and in the ...
BitterDecoction's user avatar
0 votes
1 answer
142 views

Choice of grid generation for FDM discretisation methods

I'm currently revisiting some FDM schemes for convection-diffusion equations in 1D, 2D and 3D and getting up to speed with the industry-standard methods again. The application is derivatives pricing, ...
freistil90's user avatar
2 votes
0 answers
64 views

Centered finite volume scheme for an advective term on an unstructured/irregular/non-uniform grid

Consider the continuity equation $$\frac{\partial u}{\partial t} + \frac{\partial \Phi}{\partial x} = 0$$ $$\Phi = au + b\frac{\partial u}{\partial x}$$ Suppose I want to solve the above using ...
nicholaswogan's user avatar
1 vote
1 answer
44 views

An explanation of 2delta waves on non-staggered grids

While looking into the difference between staggered and collocated grids, I came across an effect called $2\Delta x$-oscillations, which happen on non-staggered grids, but not on staggered grids. This ...
theWrongAlice's user avatar
2 votes
1 answer
103 views

Restriction in (geometric) multigrid for vectors of non-even length

Naive restriction operators in geometric multigrid that I have seen are typically implemented as a convolution and a subsequent averaging of every two entries in a vector $v^h$. For example: $$\tilde{...
lightxbulb's user avatar
  • 2,122
3 votes
1 answer
202 views

Calculations on discontinous grids

Suppose for a grid-based calculation a grid is used such that the grid Jacobian is discontinuous. For example, in 1D, for a domain $x \in$ [0,1], one half of the domain is covered uniformly by twice ...
Maxim Umansky's user avatar
4 votes
0 answers
137 views

Is there any reliable free/open source tool for structured mesh smoothing?

I have been using Pointwise for grid generation and found the quality of smoothed grids to be stunning. I am not aware of any free/open source alteranative that offers the same capabilities for ...
Pet but Ape's user avatar
1 vote
1 answer
179 views

Overlapping 1D grids

I have two 1D grids, each of them is a finite collection of cells, where the cell is defined by the left end and the right end, $[cell]_{i}$=$[x_{i}^{left}$,$x_{i}^{right}$]. I need to find the ...
Maxim Umansky's user avatar
2 votes
0 answers
520 views

How are finite volume method boundary conditions implemented without using ghost-cells?

I'm currently trying to implement my own FVM code in cpp, but when I try to calculate the laplacian of a test function, given by \begin{align}\phi_0=\sin(2\pi x)\sin(2\pi y),\end{align} I get ...
Tepa's user avatar
  • 31
1 vote
1 answer
32 views

can you give me some information of tools for load reblance

I want a tool for load rebalances. I have a distributed grid. Each process can handle a part of the global grid. Each process has a different node and I want to rebalance it. I want a tool that can ...
Xu Hui's user avatar
  • 323
2 votes
2 answers
84 views

How to refine the tetrahedron if exist two longest length edge?

In some algorithms to refine tetrahedron, we need to calculate the longest edge. background If exist a tetrahedron with node ABCD, it has edges ...
Xu Hui's user avatar
  • 323
6 votes
2 answers
254 views

What makes a good computational grid?

Most computational methods for solving PDEs are grid-based. What makes a computational grid "good", other than being sufficiently fine to resolve features of numerical solutions? Are grids ...
Maxim Umansky's user avatar
0 votes
2 answers
144 views

Grid Independence Study

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?
ram28's user avatar
  • 11
3 votes
0 answers
186 views

What is the reason for this finite-difference high errors on non-uniform grid?

tl;dr Using a Taylor-matched method to find coefficients for the discretized equation $ \mathbf{A} \vec{f}'' = \mathbf{B} \vec{f} $, a Fortran code has been implemented to find the second derivative ...
Gabriele's user avatar
  • 173
1 vote
1 answer
121 views

Is it possible to resample grid in such a way so that continuous objects remain continuous?

Suppose I rasterize a rectangle of width 2.5 gridpoints and get the values as shown: =============== | 0 | 1 | 1 | 0.5 | 0 | Now I resample that ...
Michael's user avatar
  • 417
1 vote
0 answers
31 views

Solution errors when refining a static grid: Continuous vs. step-wise refinement

Let's assume I am working on a 2-D domain on $R^2$, with my coordinates $x \in[-1,1]$, $y \in[-1,1]$ and I want to solve a popular CFD problem, like the shallow water system or the Euler system. At $x=...
AtmosphericPrisonEscape's user avatar
0 votes
0 answers
58 views

Grids for atmosphere simulation with finite volumes on the globe

I am currently in the early construction process of building a simple CFD model of a rotating planetary atmosphere. The planet should be allowed to tilt significantly, so that a time-dependent source ...
AtmosphericPrisonEscape's user avatar
0 votes
1 answer
300 views

Good C, C++ library for efficient grid search / tuples, ideally with bindings to Eigen

I have a $q$-dimensional grid, known at run, not compile-time, that has $50$ points in each direction and hence $50^3$ combinations that I would like to first build and then call a function with each ...
Hirek's user avatar
  • 183
1 vote
0 answers
20 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 ...
acalore88's user avatar
3 votes
0 answers
168 views

WENO5 scheme in a staggered grid

I'm trying to use the finite-difference WENO scheme to solve the 2D density conservation law with axial symmetry (coordinates $r,z$): $\frac{\partial \rho}{\partial t}+\nabla \cdot (\rho \vec{v}) = \...
grizzlyjoker's user avatar
1 vote
1 answer
447 views

Mapping derivative information in uniform to non-uniform grid

I'm having two sets of grids. One is uniform and another one is not uniform. I will calculate the derivative in uniform grid points and I like to transfer(map) the derivative to the non-uniform grid ...
AGN's user avatar
  • 544
1 vote
1 answer
140 views

Grid dependence of a numerical model

Statement of the problem Suppose, we consider the following model $$ \begin{array}{l} (1)~\mathbf{u}_t + \mathbf{F(u)}_x = \mathbf{S}(\mathbf{u},\mathbf{w}), \\ (2)~\mathbf{w}_x = \mathbf{P}(\mathbf{...
Oleg Kravchenko's user avatar
1 vote
2 answers
93 views

Access optimized data structure for representing integer lattice

Consider the integer lattice in $2d$, namely the set $\mathbb{Z}^2 = \{(x,y): x,y\in \mathbb{Z}\}$, and let $u:\mathbb{Z}^2 \to \mathbb{R} $ be a function defined on some bounded subset of $\mathbb{Z}^...
Hayk's user avatar
  • 111
2 votes
1 answer
4k views

Three dimensional irregular grid data interpolation to regular grid

I have three-dimensional radar reflectivity data obtained as voxels (scans, rays, altitudes). The data has been sampled at irregular spacings and I want to convert this into a regular grid. In ...
user avatar
0 votes
1 answer
60 views

Converting mass density to point mass approximation on a grid

In an nbody gravity simulation, instead of doing exact(all-pair brute force) solution, I added masses of each body into cells of a 3D grid(each cell is just a float value having a mass value). Then ...
huseyin tugrul buyukisik's user avatar
1 vote
0 answers
175 views

Choice of velocity grid - staggered or not?

I'm trying to understand when and why one would use a staggered vs. a colocated grid in problems that have velocities and scalars that they transport (e.e. density). If scalars are defined cell-...
AtmosphericPrisonEscape's user avatar
1 vote
0 answers
71 views

adaptive / smart grid choice for dynamic programming

I've a read a paper about investing where they used a dynamic programming approach to solve a finite horizon problem, i.e. $$\max_{x_t} E[u(W_T)] $$ where $u$ is a utility function and $W_T$ ...
math's user avatar
  • 101
1 vote
2 answers
189 views

Grid mapping from Tchebyshev

I am using Tchebyshev discretization to solve a system of PDEs. Usually, I map the Tchebyshev space($\xi$, from -1 to 1) to physical space ($x$, from 0 to L) using $$x = (\xi +1)*L/2$$ Now, I also ...
Rhinocerotidae's user avatar
2 votes
2 answers
69 views

Efficient Representation of (spatially sparse) spatial time series

Background I have a huge dataset consisting of points (on a plane) together with a timestamp for each point. This is a collection of car GPS measures, giving us the location (latitude/longitude) of ...
Cedric T's user avatar
0 votes
1 answer
55 views

Balancing core load when number of particles in cells vary (PIC on GPU)

Consider this basic scheme for particle in cell simulations ( with just short-range interactions ): assign particles to disjunct cells for cell $A$ go over neighboring cells $B$ for each particle $...
Prokop Hapala's user avatar
1 vote
1 answer
592 views

Finite Volume Polar Discretization: Lengths

Given a uniform polar grid, as in the figure below: and a FV discretization of a gradient for example: $\frac{\partial p}{\partial \varphi} = 0$ $\Delta r \frac{p_e - p_w}{\Delta \varphi} = 0$ My ...
Rover's user avatar
  • 128
5 votes
0 answers
196 views

How to optimally choose points for multivariable Hermite interpolation?

I have a multi-variate, continuous function $f$ from $R^n$ to $R$, which I can query for its output for any input. I would like to create interpolation polynomial for it. In one-dimensional case ...
Moonwalker's user avatar
1 vote
2 answers
1k views

Finite Difference Grid Spacing and Scaling

I have been exploring finite differences and heat transfer using the 2D heat equation to further expand my knowledge. So far I think it is going well. I am running into some confusion around grid ...
Bluebill's user avatar
1 vote
1 answer
3k views

Is there an advantage of using a staggered grid over a regular one when combined with high order methods?

The title says is all. This question is in the contest of an incompressible Navier-Stokes solver. Specifically, I am currently working on a new solver while referring myself to an older code for ...
solalito's user avatar
  • 337
0 votes
1 answer
1k views

Interpolation of velocities on staggered grid (in PIC)

Edit: (copying from my comment) Let's consider the inverse problem when I need to transfer velocities from particles to the grid (inverse bilinear interpolation). How'd I transfer a particle's x-...
sarasvati's user avatar
  • 185
1 vote
0 answers
178 views

C1 continuous spline on regular 2D-grid with quadratic 1D cuts

I want some scalar spline function defined on regular 2D grid $F(x,y)$ with continuous first derivative which is easy to intersect with arbitrary ray/line ${\vec l}(t) = (c_x t,c_y t,c_z t)$. ...
Prokop Hapala's user avatar
3 votes
1 answer
139 views

Alternative to messy grid node indexing within multiple layers of loops

Recently,I dive into a set of somehow ancient Fortran codes and try to fully understand them. A large fraction of these codes are multiple layers of loops over many state variable dimensions, which ...
zlqs1985's user avatar
  • 131
1 vote
1 answer
718 views

3-dimensional plotting with nonuniform grids

I have 3 variables I am considering: time (t), 1-dimensional space (x), and intensity (I). I would like to plot the intensity in the z-axis as a function of t and x (the latter two variables would ...
Mathews24's user avatar
  • 578
2 votes
1 answer
2k views

Contour plot interpolation recommendation

I am not sure if my question is on topic or not and if not please let me know. I have regularly spaced gridded data(output of a weather forecast simulation software) and I have latitude and ...
user avatar
1 vote
0 answers
146 views

Finding boundary intersection points with Cartesian grid?

I would like to find the intersection points e.g. $M_x$ and $M_y$ as in the attached figure. The boundary (solid line) is defined by the Lagrangian points. I am working in C++ (basic - medium ...
TheCoder's user avatar
1 vote
1 answer
103 views

Common nodes in two FEM grids

There are two independent tetrahedral FEM grids. Second grid is subset of the first. By subset, I mean: nodes from the second grid are exactly in the same positions as some nodes from the first grid. ...
Krzysztof Bzowski's user avatar
3 votes
1 answer
2k views

Generating a non-uniform grid

I am interested in generating a 1D non-uniform grid on the interval [0, L] with N points, where a region of width $\sigma$ and ...
Hemmer's user avatar
  • 265
0 votes
1 answer
1k views

Quadtree type Grid

I would like to code for a quadtree type meshing but don't know how to do. If anyone can help or can share any starting code?
TheCoder's user avatar
12 votes
5 answers
13k views

Dynamically ending ODE integration in SciPy

I have a light ray moving through space-time, i.e. a curve in $\mathbb{R}^4$, parametrized by some variable λ. The exact trajectory, i.e. the coordinate functions $x^μ(λ)$ of the curve are given by ...
balu's user avatar
  • 243