- Thank you received: 0
Apply load to cross section of volume?
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
5 years 3 months ago #1772
by creativeworker
Apply load to cross section of volume? was created by creativeworker
Hello,
is there an elegant way to apply a load to a cross section of a volume?
My volumes are mainly generated with the CSG-modeller.
Example: An elastodynamic calculation of a 3D bar. An areal force is applied to the cross section at some x coordinate. How could this be achieved without cutting the bar into two?
Thanks for your suggestions!
is there an elegant way to apply a load to a cross section of a volume?
My volumes are mainly generated with the CSG-modeller.
Example: An elastodynamic calculation of a 3D bar. An areal force is applied to the cross section at some x coordinate. How could this be achieved without cutting the bar into two?
Thanks for your suggestions!
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
5 years 3 months ago #1776
by mneunteufel
Replied by mneunteufel on topic Apply load to cross section of volume?
Hello creativeworker,
with the IfPos-CoefficientFunction you can approximate the area force by a volume force
where x0 is the cross section x-coordinate.
However, you will need a very high polynomial degree to "resolve" the small volume area.
If you have a mesh resolving the cross section (e.g. a structured grid) this approach will work with very small epsilon and low order polynomial degree.
Otherwise I would suggest to simply "cut" the geometry into two pieces and add them as one mesh, which should not be a huge problem with CSG.
Best
Michael
with the IfPos-CoefficientFunction you can approximate the area force by a volume force
Code:
f_vol = IfPos( x-x0+epsilon, IfPos(x0-x+epsilon, 1, 0), 0),
where x0 is the cross section x-coordinate.
However, you will need a very high polynomial degree to "resolve" the small volume area.
If you have a mesh resolving the cross section (e.g. a structured grid) this approach will work with very small epsilon and low order polynomial degree.
Otherwise I would suggest to simply "cut" the geometry into two pieces and add them as one mesh, which should not be a huge problem with CSG.
Best
Michael
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
- Thank you received: 0
5 years 3 months ago #1782
by creativeworker
Replied by creativeworker on topic Apply load to cross section of volume?
Thanks for your answer.
I do not really like the way of applying a 'special' volume force. So I will stick to the cutting procedure.
Is there a way of cutting a torus only once?
I do not really like the way of applying a 'special' volume force. So I will stick to the cutting procedure.
Is there a way of cutting a torus only once?
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
5 years 3 months ago #1801
by mneunteufel
Replied by mneunteufel on topic Apply load to cross section of volume?
Hi creativeworker,
this may help. Have also a look at the documentation CSG geometry
Best,
Michael
this may help. Have also a look at the documentation CSG geometry
Code:
from netgen.csg import *
geo = CSGeometry()
torus = Torus( Pnt(0,0,0),Vec(0,1,0),3,1).bc("torus")
plane = Plane( Pnt(0,0,0), Vec(1,0,0) )
geo.Add ((torus*plane)+(torus-plane))
#geo.Add (torus*plane)
mesh = Mesh(geo.GenerateMesh(maxh=1))
Draw(mesh)
Best,
Michael
Time to create page: 0.100 seconds