- Thank you received: 0
Computing integrals on a slice cutting through a domain.
5 years 1 month ago #1959
by anandes
Computing integrals on a slice cutting through a domain. was created by anandes
Hello,
If I have a BVP defined on a 2D or 3D domain (ex.: a cube) is it possible in NGSolve to compute integrals on a given slice that cuts through the domain?
For example: in the attached toy problem, I have a function u(x,y) defined on a unit cube. How do I compute the integral of u(x,y) on a plane with z-normal, say at z=0.5?
Thank you,
Anand
If I have a BVP defined on a 2D or 3D domain (ex.: a cube) is it possible in NGSolve to compute integrals on a given slice that cuts through the domain?
For example: in the attached toy problem, I have a function u(x,y) defined on a unit cube. How do I compute the integral of u(x,y) on a plane with z-normal, say at z=0.5?
Thank you,
Anand
Attachments:
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
5 years 1 month ago #1977
by mneunteufel
Replied by mneunteufel on topic Computing integrals on a slice cutting through a domain.
Hi anandes,
A similar question was asked here:
integration-over-a-cross-section
Maybe this helps.
Best,
Michael
A similar question was asked here:
integration-over-a-cross-section
Maybe this helps.
Best,
Michael
5 years 4 weeks ago #1994
by anandes
Replied by anandes on topic Computing integrals on a slice cutting through a domain.
Hi Michael,
Thanks for directing me to the relevant topic. I am currently unable to get ngsxfem working with my NGSolve installation on Ubuntu. But the other method seems to work. I have a couple of follow-up questions in this regard.
1. The boolean operation within the AddSurface functionality seems to work only on solid primitives. It throws an error if I use it on solids constructed from primitives (example: cube constructed from plane primitives; please see attached file). Is this expected?
2. Is there similar functionality for a mesh which is not associated with a geometry, for example, if I just have a mesh from another source such as Gmsh?
Thank you,
Anand
Thanks for directing me to the relevant topic. I am currently unable to get ngsxfem working with my NGSolve installation on Ubuntu. But the other method seems to work. I have a couple of follow-up questions in this regard.
1. The boolean operation within the AddSurface functionality seems to work only on solid primitives. It throws an error if I use it on solids constructed from primitives (example: cube constructed from plane primitives; please see attached file). Is this expected?
2. Is there similar functionality for a mesh which is not associated with a geometry, for example, if I just have a mesh from another source such as Gmsh?
Thank you,
Anand
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
5 years 3 weeks ago #2004
by mneunteufel
Replied by mneunteufel on topic Computing integrals on a slice cutting through a domain.
Hi anandes,
can you please provide an example where the error occurs?
In your last post you did not attach one.
Best,
Michael
can you please provide an example where the error occurs?
In your last post you did not attach one.
Best,
Michael
5 years 3 weeks ago #2010
by anandes
Replied by anandes on topic Computing integrals on a slice cutting through a domain.
Hi Michael,
I thought I did, sorry about that! Please find the attachment below.
Thank you,
Anand
I thought I did, sorry about that! Please find the attachment below.
Thank you,
Anand
Attachments:
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
5 years 3 weeks ago #2029
by mneunteufel
Replied by mneunteufel on topic Computing integrals on a slice cutting through a domain.
Hi Anand,
it works also for solids constructed from primitives. But you have to use it before adding it to the CSGeometry, see attached file.
To handle meshes without geometry I really would recommend xfem.
It is somehow possible to use your own integration rule, where you specify the according integration points, but the first option is easier, more robust and more flexible.
What error occurs when you try to get ngsxfem running?
Best,
Michael
it works also for solids constructed from primitives. But you have to use it before adding it to the CSGeometry, see attached file.
To handle meshes without geometry I really would recommend xfem.
It is somehow possible to use your own integration rule, where you specify the according integration points, but the first option is easier, more robust and more flexible.
What error occurs when you try to get ngsxfem running?
Best,
Michael
Attachments:
Time to create page: 0.109 seconds