- Thank you received: 0
Functionality of the normal vectors unclear?
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
5 years 6 months ago #1636
by creativeworker
Functionality of the normal vectors unclear? was created by creativeworker
Hello,
i'd like to calculate the forces on a surface by taking the stress tensor times the normal vectors. Therefore, i adjusted a simple example given by the forum.
There are two strange behaviors:
Perhaps i didn't understand well how the specialcf.normal works?
Thanks in advance!
i'd like to calculate the forces on a surface by taking the stress tensor times the normal vectors. Therefore, i adjusted a simple example given by the forum.
There are two strange behaviors:
- defining the specialcf.normal(3) on regions leads to unexpected results
- The BoundaryFromVolume result is completely zero when trying to export to vtk
Perhaps i didn't understand well how the specialcf.normal works?
Thanks in advance!
Attachments:
5 years 6 months ago #1637
by joachim
Replied by joachim on topic Functionality of the normal vectors unclear?
your modification brought in the problem:
The (0,0,0) - coefficientfunction is something different as 'None'.
This one works:
The (0,0,0) - coefficientfunction is something different as 'None'.
This one works:
Code:
func_domain2 = CoefficientFunction ([specialcf.normal(3) if mat== "outer" else None for mat in mesh.GetMaterials()])
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
- Thank you received: 0
5 years 6 months ago #1638
by creativeworker
Replied by creativeworker on topic Functionality of the normal vectors unclear?
Thank you! That indeed solves the first point. But still, the vtk export has no entry.
Also, trying to check the normal on one face of the box results in (0,0,0)
bfv2(mesh(0.5,0.5,0))= (0.0, 0.0, 0.0)
Also, trying to check the normal on one face of the box results in (0,0,0)
bfv2(mesh(0.5,0.5,0))= (0.0, 0.0, 0.0)
Time to create page: 0.099 seconds