Skip to content

Mesh density as a function of CFL? #112

Answered by SorooshMani-NOAA
ivicajan asked this question in Q&A
Discussion options

You must be logged in to vote

Modifying mesh is not OCSMesh's strongest suit, but you can definitely remesh while specifying initial points (your old mesh nodes). For remesh I haven't yet implemented a clean API in OCSMesh, but you can still use OCSMesh to prepare inputs for Jigsaw (the mesh engine OCSMesh uses).

The scripts below adds a CFL constraint on the mesh size, but doesn't enforce old edges and vertices to be fixed. It just approximates the old mesh size where the CFL is already met.

from copy import deepcopy

import numpy as np
from ocsmesh import Mesh, Hfun, Geom, utils, JigsawDriver

# import other stuff...


old_mesh_crs = ...
desired_timestep = ...
high_cfl_value = ...
low_cfl_value = ...
nu = ...

old_mesh

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@ivicajan
Comment options

@SorooshMani-NOAA
Comment options

Answer selected by ivicajan
@ivicajan
Comment options

@SorooshMani-NOAA
Comment options

Comment options

You must be logged in to vote
3 replies
@SorooshMani-NOAA
Comment options

@ivicajan
Comment options

@SorooshMani-NOAA
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants