Skip to content

Commit

Permalink
Update example 06 to get rid of invalid front edges
Browse files Browse the repository at this point in the history
  • Loading branch information
FloSewn committed Apr 25, 2024
1 parent 1762bdd commit bec699c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
Binary file modified doc/airfoil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/thin_fracture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions input/06_airfoil_from_csv.para
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#===========================================================

#-----------------------------------------------------------
# MESH DEFINITION
# OUTER MESH DEFINITION
#-----------------------------------------------------------
Define mesh:
Element size: 0.004
Element size: 0.003
Element color: 1
Meshing algorithm: Triangulation
Number of quad refinements: 0
Expand All @@ -22,21 +22,21 @@ Define mesh:

Define interior boundary from CSV file: ../auxiliary/test_data/Airfoil.csv

Add quad layers: 0.69132, 0.09754, 0.69132, 0.09754, 10, 0.0005, 1.10
Add quad layers: 0.69132, 0.09754, 0.69132, 0.09754, 10, 0.0004, 1.10

#---------------------------------------------------------
# LOCAL REFINEMENT
#---------------------------------------------------------
Define fixed vertices:
0.69095,0.09625, 0.0020,0.02
0.85985,0.07582, 0.0008,0.005
0.69095, 0.09625, 0.0020, 0.02
0.85985, 0.07582, 0.0008, 0.005
End fixed vertices

End mesh


#-----------------------------------------------------------
# Mesh #3
# INNER MESH DEFINITION
#-----------------------------------------------------------
Define mesh:
Element size: 0.003
Expand Down
4 changes: 2 additions & 2 deletions input/08_thin_fracture.para
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Define mesh:
Number of smoothing iterations: 3

# Output formats: COUT, TXT, VTU
Output file format: TXT
Output file prefix: ./frac2d-quad
Output file format: VTU
Output file prefix: ./thin_fracture

#---------------------------------------------------------
# BOUNDARIES
Expand Down
10 changes: 8 additions & 2 deletions src/examples/06_airfoil_from_csv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ void airfoil_from_csv()
/*------------------------------------------------------------------
| Define the size function
------------------------------------------------------------------*/
UserSizeFunction f_outer = [](const Vec2d& p) { return 0.003; };
UserSizeFunction f_outer = [](const Vec2d& p) { return 0.004; };

Domain outer_domain { f_outer };
outer_domain.add_exterior_boundary().set_shape_circle(1, {0.77, 0.09}, 0.14, 60);
outer_domain.add_interior_boundary().set_shape_from_csv(csv_file);

/*------------------------------------------------------------------
| We use some additional fixed vertices to locally refine the mesh
------------------------------------------------------------------*/
outer_domain.add_fixed_vertex(0.69095, 0.09625, 0.0020, 0.02);
outer_domain.add_fixed_vertex(0.85985, 0.07582, 0.0008, 0.005);

/*------------------------------------------------------------------
| Initialize the outer mesh
------------------------------------------------------------------*/
Expand All @@ -53,7 +59,7 @@ void airfoil_from_csv()
------------------------------------------------------------------*/
generator.quad_layer_generation(outer_mesh)
.n_layers(10)
.first_height(0.0003)
.first_height(0.0004)
.growth_rate(1.10)
.starting_position({0.69132,0.09754})
.ending_position({0.69132,0.09754})
Expand Down

0 comments on commit bec699c

Please sign in to comment.