- Thank you received: 0
controlling mesh density with netgen
5 years 9 months ago #1420
by masi2019
controlling mesh density with netgen was created by masi2019
Hi Everybody,
I am using netgen quite extensively for my work.
I am using the similar following script for generation of my model.
algebraic3d
#
# Example with two sub-domains:
# cube dimension
solid cube = plane (0, 0, 0; 0, 0, -1)
and plane (0, 0, 0; 0, -1, 0)
and plane (0, 0, 0; -1, 0, 0)
and plane (10, 10, 10; 0, 0, 1)
and plane (10, 10, 10; 0, 1, 0)
and plane (10, 10, 10; 1, 0, 0);
# sphere arrangement
solid sph = sphere (5.0, 5.0, 5.0; 2.0);
solid rest = cube and not sph;
tlo rest -transparent -col=[1,0,0] -maxh=0.52;
tlo sph -col=[0,0,1] -maxh=0.52;
#tlo cube -transparent -col=[1,0,0];
#tlo sph -col=[1,1,1];
Here, I can control mesh density globally by setting maxh value..
Now my question is that how can we control the mesh density at different region say at interface?
Any help would be appreciated. Thank you
I am using netgen quite extensively for my work.
I am using the similar following script for generation of my model.
algebraic3d
#
# Example with two sub-domains:
# cube dimension
solid cube = plane (0, 0, 0; 0, 0, -1)
and plane (0, 0, 0; 0, -1, 0)
and plane (0, 0, 0; -1, 0, 0)
and plane (10, 10, 10; 0, 0, 1)
and plane (10, 10, 10; 0, 1, 0)
and plane (10, 10, 10; 1, 0, 0);
# sphere arrangement
solid sph = sphere (5.0, 5.0, 5.0; 2.0);
solid rest = cube and not sph;
tlo rest -transparent -col=[1,0,0] -maxh=0.52;
tlo sph -col=[0,0,1] -maxh=0.52;
#tlo cube -transparent -col=[1,0,0];
#tlo sph -col=[1,1,1];
Here, I can control mesh density globally by setting maxh value..
Now my question is that how can we control the mesh density at different region say at interface?
Any help would be appreciated. Thank you
5 years 9 months ago #1421
by hvwahl
Replied by hvwahl on topic controlling mesh density with netgen
Hi,
if you look at the documentation Netgen Tutorial: Mesh size , csg primitives can be given a local mesh size, e.g.,
Best wishes,
Henry
if you look at the documentation Netgen Tutorial: Mesh size , csg primitives can be given a local mesh size, e.g.,
Code:
# Set the mesh size on the sphere surface to 0.1
sphere = Sphere(Pnt(0,0,0),1).maxh(0.1)
Best wishes,
Henry
The following user(s) said Thank You: masi2019
5 years 9 months ago #1425
by joachim
Replied by joachim on topic controlling mesh density with netgen
some more possibilities you find here:
ngsolve.org/docu/latest/i-tutorials/unit...etting-the-mesh-size
Joachim
ngsolve.org/docu/latest/i-tutorials/unit...etting-the-mesh-size
Joachim
The following user(s) said Thank You: masi2019
5 years 9 months ago #1435
by masi2019
Replied by masi2019 on topic controlling mesh density with netgen
problem is I am only using netgen for generating mesh, not ngsolve. Can you suggest me some *-msz file example which I can use for sphereincube.geo file example (which I put for the main question), please?
Thanks
Thanks
5 years 9 months ago #1436
by masi2019
Replied by masi2019 on topic controlling mesh density with netgen
thank you but any idea of how I can do the same without ngsolve but simply netgen. What the syntax there for controlling local mesh density
5 years 9 months ago #1437
by joachim
Replied by joachim on topic controlling mesh density with netgen
its not a question of Netgen or NGSolve, but how to do it in pre-Python times:
have a look into Section 4.1:
netgen-mesher.sourceforge.net/docs/ng4.pdf
Joachim
have a look into Section 4.1:
netgen-mesher.sourceforge.net/docs/ng4.pdf
Joachim
Time to create page: 0.117 seconds