07-Jan-2022 23:02:53 mesh2d_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test mesh2d(). airfoil_exterior_test(): MATLAB version Demonstrate MESH2D on an airfoil Airfoil, max element size is 0.50. Boundary node plot saved as "airfoil_exterior_vertices.png" WARNING: 1 duplicate node(s) removed 106 boundary vertices input, 640 nodes and 1020 triangles created Wrote nodes to file "airfoil_exterior_nodes.txt" Wrote elements to file "airfoil_exterior_elements.txt" airfoil_exterior_test: Normal end of execution. airfoil_interior_test: MATLAB version Demonstrate MESH2D on an airfoil Airfoil, max element size is 0.50. Boundary node plot saved as "airfoil_interior_vertices.png" WARNING: 1 duplicate node(s) removed 102 boundary vertices input, 246 nodes and 369 triangles created Wrote nodes to file "airfoil_interior_nodes.txt" Wrote elements to file "airfoil_interior_elements.txt" airfoil_interior_test: Normal end of execution. baffle_test: MATLAB version Demonstrate MESH2D on a channel with circular baffles. Channel, max element size is 0.50, baffles inserted. 82 boundary vertices input, 512 nodes and 874 triangles created baffle_test: Normal end of execution. circle_test: MATLAB version Demonstrate MESH2D on a circle. Circle. 16 boundary vertices input, 249 nodes and 432 triangles created Wrote FEM node file "circle_nodes.txt" Wrote FEM element file "circle_elements.txt" Wrote XML file "circle.xml" circle_test Normal end of execution. circles_test: MATLAB version Demonstrate MESH2D on a channel with an off-center hole. Circle with a hole, max element size is 0.50. 32 boundary vertices input, 256 nodes and 416 triangles created circles_test Normal end of executions. ell_test: MATLAB version ell() demonstrates MESH2D on the L-shaped region. EXAMPLE 1: Minimal Input Use 6 vertices on the boundary. 6 boundary vertices input 21 nodes and 24 triangles created EXAMPLE 2: Set a few small boundary segments. Use 8 vertices on the boundary. 8 boundary vertices input 43 nodes and 57 triangles created EXAMPLE 3: Set maximum element size HDATA.HMAX = 0.1 6 boundary vertices input 225 nodes and 384 triangles created EXAMPLE 4: Specify small elements near reentrant corner using a size function. 6 boundary vertices input 979 nodes and 1850 triangles created EXAMPLE 5: Repeat example #1, then call refine ( ). 6 boundary vertices input 21 nodes and 24 triangles created 6 boundary vertices input 65 nodes and 96 triangles created EXAMPLE 6: Repeat example #2, then call smoothmesh ( ). 8 boundary vertices input 43 nodes and 57 triangles created 8 boundary vertices input 43 nodes and 57 triangles created ell_test: Normal end of execution. FACE_TEST FACE_TEST Normal end of execution. mesh_test This is a demo function for mesh2d Several example meshes are shown, starting with some simple examples and progressing to the CFD-like applications for which the function was designed. The following is a simple mesh in a circle. The element size function is generated automatically to try to adequately resolve the geometry. This means that the mesh size is related to the length of the line segments used to define the geometry. The following example is the same as the last, but with more lines used to represent the circle. It is often necessary to specify the element size in some locations Mesh2d can now deal with very fine "sliver" geometry features The following is a mesh used to simulate the flow past a cylinder. This example also shows how user specified and automatic size functions are combined The following is a mesh used to simulate the flow past an airfoil/flap configuration. The following is a mesh of Lake Superior and is a standard test of mesh algorithms. This example uses the automatic size function only The following shows the influence of gradient limiting on the size function. The value dhmax is reduced to 0.1 The following example shows how the element size can be controlled using the various settings in HDATA. The following example shows how an existing mesh can be refined using the REFINE function. This avoids doing expensive retriangulation. mesh_test Normal end of execution. mesh_oops_test: MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Demonstrate the MESH2D program for creating meshes. EXAMPLE 1: The Circle We start with 24 points on the circumference. The element size function is generated automatically to try to adequately resolve the geometry. This means that the mesh size is related to the length of the line segments used to define the geometry. 24 boundary vertices input, 57 nodes and 88 triangles created The following example is the same as the last, but with more lines used to represent the circle. 150 boundary vertices input, 571 nodes and 990 triangles created It is often necessary to specify the element size in some locations. 4 boundary vertices input, 759 nodes and 1434 triangles created Mesh2d can now deal with very fine "sliver" geometry features. 8 boundary vertices input, 1084 nodes and 1842 triangles created The following is a mesh used to simulate the flow past a cylinder. 204 boundary vertices input, 6630 nodes and 12964 triangles created The following is a mesh used to simulate the flow past an airfoil/flap configuration. 126 boundary vertices input, 3501 nodes and 5987 triangles created The following is a mesh of Lake Superior and is a standard test of mesh algorithms. 303 boundary vertices input, 1875 nodes and 2891 triangles created The following shows the influence of gradient limiting on the size function. The following example shows how the element size can be controlled. 4 boundary vertices input, 183 nodes and 300 triangles created The following example shows how an existing mesh can be refined. 4 boundary vertices input, 81 nodes and 128 triangles created 4 boundary vertices input, 129 nodes and 224 triangles created 4 boundary vertices input, 129 nodes and 224 triangles created mesh_oops_test: Normal end of execution. obstacle_test: MATLAB version Demonstrate MESH2D on the channel with a square obstacle. EXAMPLE 1: Channel, no obstacle. 4 boundary vertices input, 27 nodes and 32 triangles created EXAMPLE 2: Channel, max element size is 0.25. 4 boundary vertices input, 293 nodes and 504 triangles created EXAMPLE 3: Channel, max element size is 0.25, obstacle inserted. 8 boundary vertices input, 286 nodes and 476 triangles created obstacle_test Normal end of execution. rectangle_minus_circle_test: MATLAB version Demonstrate MESH2D on a rectangle minus a circle. Rectangle (4 nodes) minus circle (12 nodes). n_circle = 12 v = -1.0000 -1.0000 1.0000 -1.0000 1.0000 1.0000 -1.0000 1.0000 0.7500 0.5000 0.7165 0.6250 0.6250 0.7165 0.5000 0.7500 0.3750 0.7165 0.2835 0.6250 0.2500 0.5000 0.2835 0.3750 0.3750 0.2835 0.5000 0.2500 0.6250 0.2835 0.7165 0.3750 e = 1 2 2 3 3 4 4 1 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 5 16 boundary vertices input, 280 nodes and 484 triangles created Wrote FEM node file "rectangle_minus_circle_nodes.txt" Wrote FEM element file "rectangle_minus_circle_elements.txt" Wrote XML file "rectangle_minus_circle.xml" rectangle_minus_circle_test Normal end of execution. refine_test: MATLAB version Demonstrate MESH2D refinement option on the L-shaped region. 1) Create a default mesh. 2) Use the default refinement option. 3) Use the refinement option with a mask vector. EXAMPLE 1: Minimal Input Use 6 vertices on the boundary. 6 boundary vertices input, 21 nodes and 24 triangles created EXAMPLE 2: Refine all triangles with centroid above y=1/2. 6 boundary vertices input, 52 nodes and 76 triangles created EXAMPLE 3: Refine all triangles with centroid x < 1. 6 boundary vertices input, 101 nodes and 164 triangles created refine_test: Normal end of execution. square_border_test: MATLAB version Demonstrate MESHFACES on an square in a square. We want to mesh two adjacent regions in such a way that the meshes use common nodes on their interface. Instead of using MESH2D, we need to used MESHFACES. square_border_test: Normal end of execution. two_foci_demo: MATLAB version Demonstrate MESH2D on a the two foci problem. two_foci_demo: Normal end of execution. mesh2d_test(): Normal end of execution. 07-Jan-2022 23:09:33