Skip to content
Snippets Groups Projects
Commit a95c8b7d authored by Boman Romain's avatar Boman Romain
Browse files

improve mech tests

parent dd1ca6bd
No related branches found
No related tags found
No related merge requests found
Pipeline #7110 passed
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import cxxfem as fem import cxxfem as fem
import os
import gmsh import gmsh
...@@ -77,8 +76,6 @@ if __name__ == "__main__": ...@@ -77,8 +76,6 @@ if __name__ == "__main__":
build_square(0.0, 0.0, 10.0, 1.0, 80, 8, True, True) build_square(0.0, 0.0, 10.0, 1.0, 80, 8, True, True)
# build_square(0.0, 0.0, 10.0, 1.0, 2, 1, True, True) # build_square(0.0, 0.0, 10.0, 1.0, 2, 1, True, True)
# input()
m = fem.Medium(pbl, "interior", 100.0, 0.3) m = fem.Medium(pbl, "interior", 100.0, 0.3)
d1 = fem.Dirichlet(pbl, "left", "X", 0.0) d1 = fem.Dirichlet(pbl, "left", "X", 0.0)
...@@ -95,6 +92,7 @@ if __name__ == "__main__": ...@@ -95,6 +92,7 @@ if __name__ == "__main__":
post = fem.Post(solver) post = fem.Post(solver)
post.build_views() post.build_views()
post.show_views( [ "stress_tensor", "force_vector" ] ) post.show_views( [ "stress_tensor", "force_vector" ] )
post.write()
post.deform(5) post.deform(5)
post.probe("force_vector", 1) post.probe("force_vector", 1)
......
...@@ -52,8 +52,7 @@ if __name__ == "__main__": ...@@ -52,8 +52,7 @@ if __name__ == "__main__":
bcs.append(fem.Dirichlet(pbl, "Left", dof=d, val=0.0)) bcs.append(fem.Dirichlet(pbl, "Left", dof=d, val=0.0))
# Vertical displacement # Vertical displacement
# bcs.append(fem.Dirichlet(pbl, "Right", dof='Z', val=-1.0)) # prescribed displ # bcs.append(fem.Dirichlet(pbl, "Right", dof='Z', val=-1.0)) # prescribed displ
# bcs.append(fem.Neumann(pbl, "Corner", 'Z', -0.1)) # concentrated force (seems OK) # bcs.append(fem.Neumann(pbl, "Corner", 'Z', -0.1)) # concentrated force (seems OK)
bcs.append(fem.Neumann(pbl, "Top", 'Z', -1e-2)) # distributed load bcs.append(fem.Neumann(pbl, "Top", 'Z', -1e-2)) # distributed load
bcs.append(fem.Neumann(pbl, "Top", 'Y', -5e-2)) # distributed load bcs.append(fem.Neumann(pbl, "Top", 'Y', -5e-2)) # distributed load
...@@ -67,10 +66,9 @@ if __name__ == "__main__": ...@@ -67,10 +66,9 @@ if __name__ == "__main__":
post.build_views() post.build_views()
post.show_views(['force_vector','stress_tensor']) post.show_views(['force_vector','stress_tensor'])
post.set_camera_3D() post.set_camera_3D()
# post.write() post.write()
post.deform() post.deform()
args = fem.parseargs() args = fem.parseargs()
if not args.nogui: if not args.nogui:
post.view() post.view()
...@@ -21,6 +21,7 @@ a = Analysis( ...@@ -21,6 +21,7 @@ a = Analysis(
(r'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\redist\intel64_win\compiler\libiomp5md.dll', '.') (r'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\redist\intel64_win\compiler\libiomp5md.dll', '.')
], ],
datas=[ datas=[
(r'cxxfem\tests\parallelepiped.geo',r'models\others'),
(r'cxxfem\tests\beam2d.py',r'models\others'), (r'cxxfem\tests\beam2d.py',r'models\others'),
(r'cxxfem\tests\beam3d.py',r'models\others'), (r'cxxfem\tests\beam3d.py',r'models\others'),
(r'models\dolicorhynchops\dolicorhynchops_10k.py',r'models\others\dolicorhynchops'), (r'models\dolicorhynchops\dolicorhynchops_10k.py',r'models\others\dolicorhynchops'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment