Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
HO_homog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Baptiste Durand
HO_homog
Commits
03178616
Commit
03178616
authored
Jan 12, 2021
by
Baptiste Durand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test: generating a RVE that correspond to the auxetic triangle / kagome microstructure
parent
57dcb605
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
test/test_mesh_generate_kagome.py
test/test_mesh_generate_kagome.py
+27
-0
No files found.
test/test_mesh_generate_kagome.py
0 → 100644
View file @
03178616
# coding: utf-8
import
gmsh
import
ho_homog.geometry
as
geo
import
ho_homog.mesh_generate
as
mg
geo
.
init_geo_tools
()
geo
.
set_gmsh_option
(
"Mesh.MshFileVersion"
,
4.1
)
def
test_kagome
():
""" Generate a mesh that corresponds to one unit cell of 'kagome' microstructure.
Two cases : alpha = 0.5, fully open, alpha = 0.1 triangles almost close"""
a
=
1
junction_thinness
=
1e-2
for
alpha
in
[
0.1
,
0.5
]:
rve
=
mg
.
kagome
.
kagome_RVE
(
0.5
,
junction_thinness
,
a
=
a
,
name
=
f
"kagome_
{
alpha
:.
2
f
}
"
)
lc_ratio
=
1
/
2
lc_min_max
=
(
lc_ratio
*
junction_thinness
*
a
,
lc_ratio
*
a
)
d_min_max
=
(
2
*
junction_thinness
*
a
,
a
)
rve
.
main_mesh_refinement
(
d_min_max
,
lc_min_max
,
False
)
rve
.
mesh_generate
()
gmsh
.
model
.
mesh
.
renumberNodes
()
gmsh
.
model
.
mesh
.
renumberElements
()
gmsh
.
write
(
str
(
rve
.
mesh_abs_path
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment