Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Apply load to cross section of volume?

More
4 years 9 months ago #1772 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!
More
4 years 9 months ago #1776 by mneunteufel
Hello creativeworker,

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
More
4 years 8 months ago #1782 by creativeworker
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?
More
4 years 8 months ago #1801 by mneunteufel
Hi creativeworker,

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.110 seconds