Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colon #43

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 37 additions & 11 deletions scaffoldmaker/meshtypes/meshtype_3d_centrallinetube1.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def checkOptions(options):
options[key] = 1
if (options['Number of elements around'] < 2) :
options['Number of elements around'] = 2
if (options['Tube type'] < 1 or options['Tube type'] > 3 ) :
if (options['Tube type'] < 1 or options['Tube type'] > 5 ) :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is more convenient it <1 --> 1 and > 5 --> 5.

options['Tube type'] = 1

@staticmethod
Expand All @@ -84,11 +84,11 @@ def generateBaseMesh(region, options):
# Straight tube
cx = [[1.0, 3.0, 0.0], [ 2.0, 0.0, 4.0 ] ]
cd1 = [[ 1.0, -3.0, 4.0 ], [ 1.0, -3.0, 4.0 ]]
cd2 = [ [ 0.0, 0.3, 0.0 ], [ 0.0, 0.3, 0.0 ]]
cd2 = [ [ 0.0, 0.2, 0.0 ], [ 0.0, 0.2, 0.0 ]]
cd3 = [ [ 0.0, 0.0, 0.5 ], [ 0.0, 0.0, 0.5 ]]

# thickness in cd2 and cd3 directions and derivatives (rate of change)
t2 = [ 0.5, 0.5 ]
t2 = [ 0.1, 0.5 ]
t2d = [ 0.0, 0.0 ]
t3 = [ 0.5, 0.5 ]
t3d = [ 0.0, 0.0 ]
Expand All @@ -108,16 +108,42 @@ def generateBaseMesh(region, options):

elif tubeType == 3:
# Curved tube 2
cx = [ [ 0.0, 0.0, 1.0], [1.0, 1.0, 2.0], [ 2.0, 0.0, 4.0 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, 0.0 ], [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0], [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0 ]]
cd3 = [ [ 0.0, 0.0, 0.5 ], [ 0.0, 0.0, 0.5 ], [ 0.0, 0.0, 0.5], [ 0.0, 0.0, 0.5 ], [ 0.0, 0.0, 0.5], [ 0.0, 0.0, 0.5]]

# thickness in cd2 and cd3 directions and derivatives (rate of change)
t2 = [ 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ]
t2d = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
t3 = [ 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
t3d = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

elif tubeType == 5:
# Colon in 3D
cx = [ [ 0.0, 0.0, 0.0], [0.0, 10.0, 3.0], [5.0, 9.0, 0.0], [ 10.0, 10.0, 2.0 ], [15.0, 15.0, 7.0], [ 20.0, -2.0, 0.0], [ 10.0, -4.0, -0.0] ]
cd1 = [ [ 0.0, 10.0, 3.0 ], [ 5.0, 5.0, 0.0 ], [5.0, 0.0, 0.0], [ 10.0, -5.0, 0.0 ], [12.0, 12.0, 0.0], [ 5.0, -12.0, -5.0 ], [ -8.0, 0.0, 0.0 ]]
cd2 = [ [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0 ], [ 0.0, 0.5, 0.0 ]]
cd3 = [ [ 0.0, 0.0, 0.5 ], [ 0.0, 0.0, 0.5 ], [ 0.0, 0.0, 0.5], [ 0.0, 0.0, 0.5], [ 0.0, 0.0, 0.5], [ 0.0, 0.0, 0.5 ], [ 0.0, 0.0, 0.5]]

# thickness in cd2 and cd3 directions and derivatives (rate of change)
t2 = [ 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ]
t2d = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
t3 = [ 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
t3d = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

nextNodeIdentifier, nextElementIdentifier = generatetubemesh(region, elementsCountAlong, elementsCountAround, elementsCountThroughWall,
cx, cd1, cd2, cd3, t2, t2d, t3, t3d, useCrossDerivatives, useCubicHermiteThroughWall)
Expand Down
Loading