-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implement a nurbs cylindrical shell sector #168
base: main
Are you sure you want to change the base?
Conversation
499fca9
to
56cf723
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @eulovi for the contribution. Looks good, I left some minor comments.
@@ -102,6 +103,7 @@ | |||
"add_geomdl_nurbs_to_mesh", | |||
# NURBS geometry functions | |||
"create_nurbs_hollow_cylinder_segment_2d", | |||
"create_nurbs_cylindrical_shell_sector", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we order these imports alphabetically? (I know they were not in that order to begin with...)
def create_nurbs_cylindrical_shell_sector( | ||
radius, angle, length, *, n_ele_u=1, n_ele_v=1 | ||
): | ||
"""Creates a patch of a surface of a 3-dimensional sector of a cylindrical |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can this pass the pre-commit hooks? Shouldn't the docstring be a single line and then a newline before the detailed description? @davidrudlstorfer any ideas?
radius: double | ||
cylindrical shell radius | ||
angle: double | ||
angle of the cylindrical shell (radians) | ||
length: double | ||
length of the cylindrical shell | ||
n_ele_u: int | ||
number of elements in the parametric u-direction | ||
n_ele_v: int | ||
number of elements in the parametric v-direction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of specifying the type here, you can use type hints in the signature:
def create_nurbs_cylindrical_shell_sector(
radius:float, angle:float, length:float, *, n_ele_u:int=1, n_ele_v:int=1
):
|
||
# Create the surface of a quarter of a hollow cylinder | ||
surf_obj = create_nurbs_cylindrical_shell_sector( | ||
1, np.pi / 3, 1, n_ele_u=4, n_ele_v=3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use values different from 1 here? Preferably values that don't have a "clear common denominator", e.g., 2.5
and 3.1
.
input_file = InputFile() | ||
|
||
# Add material | ||
mat = MaterialStVenantKirchhoff(youngs_modulus=50, nu=0.19, density=5.3e-7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don't need to specify the values here.
|
||
# Create patch set | ||
element_description = ( | ||
"KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, you can use a dummy string here.
In this MR, a cylindrical shell sector is implemented. This geometry is necessary for generating the surface of a half-cylinder.