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

add fixations

parent c93bf254
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ def parms(d={}): ...@@ -16,7 +16,7 @@ def parms(d={}):
'file': f'{path}/Lmuscle.ply', 'file': f'{path}/Lmuscle.ply',
'force': 100., 'force': 100.,
'focalpt': f'{path}/LmuscleF.off', 'focalpt': f'{path}/LmuscleF.off',
'method': 'T' # 'U', 'T', 'T+N' 'method': 'U' # 'U', 'T', 'T+N'
}, },
{ {
'file': f'{path}/Rmuscle.off', 'file': f'{path}/Rmuscle.off',
...@@ -25,6 +25,17 @@ def parms(d={}): ...@@ -25,6 +25,17 @@ def parms(d={}):
'method': 'T' 'method': 'T'
} }
] ]
p['fixations'] = {
'teeth': ['x'],
'LTMJ': ['x','y','z'],
'RTMJ': ['x','z']
}
# material properties
p['density'] = 1.850e-9 # [T/mm³] - bone: 1.850 kg/l
p['Young'] = 20000. # [MPa] elastic modulus - bone: 17-20 GPa
p['Poisson'] = 0.3 # [-] Poisson's ratio
p.update(d) p.update(d)
return p return p
......
...@@ -9,7 +9,7 @@ def parms(d={}): ...@@ -9,7 +9,7 @@ def parms(d={}):
path = 'dolicorhynchops/10k' path = 'dolicorhynchops/10k'
p['mandible'] = f'{path}/mandible.ply' p['mandible'] = f'{path}/mandible.ply'
# p['teeth'] = f'{path}/teeth.off' # p['teeth'] = f'{path}/teeth.off'
p['LTMJ'] = f'{path}/LTMJ.off' p['LTMJ'] = [0.1458893, -73.13895, 227.3909],
p['RTMJ'] = f'{path}/RTMJ.off' p['RTMJ'] = f'{path}/RTMJ.off'
p['muscles'] = [ p['muscles'] = [
{ {
...@@ -25,6 +25,11 @@ def parms(d={}): ...@@ -25,6 +25,11 @@ def parms(d={}):
'method': 'T' 'method': 'T'
} }
] ]
p['fixations'] = {
'teeth': ['x','y','z'],
'LTMJ': ['x','y','z'],
'RTMJ': ['x','y','z']
}
p['food'] = 'cylinder' p['food'] = 'cylinder'
R = 10 R = 10
p['cylinder'] = { p['cylinder'] = {
...@@ -37,6 +42,13 @@ def parms(d={}): ...@@ -37,6 +42,13 @@ def parms(d={}):
p['tolNR'] = 1e-4 # [-] equilibrium tolerance p['tolNR'] = 1e-4 # [-] equilibrium tolerance
p['dt0'] = 2e-2 # [s] time step size p['dt0'] = 2e-2 # [s] time step size
# material properties
p['density'] = 1.850e-9 # [T/mm³] - bone: 1.850 kg/l
p['Young'] = 20000. # [MPa] elastic modulus - bone: 17-20 GPa
p['Poisson'] = 0.3 # [-] Poisson's ratio
p.update(d) p.update(d)
return p return p
......
...@@ -25,6 +25,17 @@ def parms(d={}): ...@@ -25,6 +25,17 @@ def parms(d={}):
'method': 'T+N' 'method': 'T+N'
} }
] ]
p['fixations'] = {
'teeth': ['x'],
'LTMJ': ['x','y','z'],
'RTMJ': ['x','z']
}
# material properties
p['density'] = 1.850e-9 # [T/mm³] - bone: 1.850 kg/l
p['Young'] = 20000. # [MPa] elastic modulus - bone: 17-20 GPa
p['Poisson'] = 0.3 # [-] Poisson's ratio
p.update(d) p.update(d)
return p return p
......
...@@ -26,7 +26,11 @@ def parms(d={}): ...@@ -26,7 +26,11 @@ def parms(d={}):
{ 'file': f'{path}/Rmuscle.off', 'force': 100., 'focalpt':f'{path}/RmuscleF.off', 'method':'T'} { 'file': f'{path}/Rmuscle.off', 'force': 100., 'focalpt':f'{path}/RmuscleF.off', 'method':'T'}
] ]
p['food'] = 'fixteeth' # type of food: 'fixteeth' or 'cylinder' p['food'] = 'fixteeth' # type of food: 'fixteeth' or 'cylinder'
p['fixations'] = {
'teeth': ['x','y','z'], # constrained degrees of freedom
'LTMJ': ['x','y','z'],
'RTMJ': ['x','y','z']
}
# rigid cylinder (used if p['food']=='cylinder') # rigid cylinder (used if p['food']=='cylinder')
R = 20 R = 20
p['cylinder'] = { p['cylinder'] = {
...@@ -123,10 +127,12 @@ def getMetafor(p={}): ...@@ -123,10 +127,12 @@ def getMetafor(p={}):
fct.setData(0.0, 0.0) fct.setData(0.0, 0.0)
fct.setData(1.0, 1.0) fct.setData(1.0, 1.0)
txt2key = { 'x': TX, 'y':TY, 'z':TZ }
# axis of rotation # axis of rotation
for gname in ['LTMJ', 'RTMJ']: for gname in ['LTMJ', 'RTMJ']:
for d in [ TX, TY, TZ ]: for d in p['fixations'][gname]:
domain.getLoadingSet().define(groups[gname], Field1D(d,RE), 0.0) domain.getLoadingSet().define(groups[gname], Field1D(txt2key[d],RE), 0.0)
mshpts = geometry.getMesh().getPointSet() mshpts = geometry.getMesh().getPointSet()
for name, gr in mgroups.items(): for name, gr in mgroups.items():
...@@ -162,8 +168,8 @@ def getMetafor(p={}): ...@@ -162,8 +168,8 @@ def getMetafor(p={}):
elif p['food']=='fixteeth': elif p['food']=='fixteeth':
# teeth are fixed along X # teeth are fixed along X
create_group(p['teeth'], nods_no, nods_pos, domain, groups, 'teeth') create_group(p['teeth'], nods_no, nods_pos, domain, groups, 'teeth')
for d in [ TX ]: for d in p['fixations']['teeth']:
domain.getLoadingSet().define(groups['teeth'], Field1D(d,RE), 0.0) domain.getLoadingSet().define(groups['teeth'], Field1D(txt2key[d],RE), 0.0)
else: else:
# p['food'] is a filename # p['food'] is a filename
ply2mtf(domain, p['food']) ply2mtf(domain, p['food'])
......
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