# Apply load to cross section of volume?

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?

Hello creativeworker,

with the IfPos-CoefficientFunction you can approximate the area force by a volume force

``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

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?

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) )