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.

XFEM dirichlet bc

More
3 years 10 months ago #2833 by nepomuk
XFEM dirichlet bc was created by nepomuk
Hi,
I'm working with XFEM and I would assume, that the boundary conditions should also hold for u_x (not only for u_std).

With
Code:
Vh = H1(mesh, order=1, dim=mesh.dim, dirichlet="left") Vhx = XFESpace(Vh,ci) VhG = FESpace([Vh,Vhx]) freedofs = VhG.FreeDofs() print(freedofs)

I get
0: 0110111111111000111111111111111111111

but when clearing the dofs by hand
Code:
VhGx, VhGy = VhG.components for w in mesh.vertices: if abs(w.point[0])<0.00001: for dof in VhG.GetDofNrs(w): freedofs.Clear(dof) freedofs.Clear(VhGx.ndof+dof) print(freedofs)

also the dofs in the u_x part are also cleared:
0: 0110111111111000111111111110010011111

Does XFEM work like this or is this maybe a bug?

BR,
Nepomuk
More
3 years 10 months ago #2836 by schruste
Replied by schruste on topic XFEM dirichlet bc
Dear Nepomuk,

In general it is not clear if you really want to prescribe Dirichlet boundary conditions on an XFEM variable. Note that the XFEM basis is special so that interpolation of the Dirichlet value is not obvious. Perhaps you can prescribe what you want to do. Do you have an interface crossing the domain boundary?

In short: Boundary values for XFEM values is not standard in the current implementation, but - depending on what you want to do - you can do this "manually". Please help me out with you use case and I comment on this further.

Best,
Christoph
More
3 years 10 months ago - 3 years 10 months ago #2845 by nepomuk
Replied by nepomuk on topic XFEM dirichlet bc
Hi Christoph,

I use XFEM to do topology optimization on a cantilever, fixed on the left (homogene dirichlet), weighted on the right (neuman data g at gamma_N). After some iterations the interface between inner and outer material crosses the left boundary and I wondered, why there is a deformation around the interface.

The second issue is, when assembling the r.h.s. ([tex]\int_{\Gamma_N} g\cdot v\ ds[/tex]) assembling v_x*ds is not possible, what would be needed if the interface crosses also the weighted boundary part.

Thanks for your help!
BR, Nepomuk
Last edit: 3 years 10 months ago by nepomuk.
More
3 years 10 months ago #2850 by schruste
Replied by schruste on topic XFEM dirichlet bc
Hi Nepomuk,

So, in principle we support the case that you described and if the boundary elements are intersected the corresponding XFEM-Dofs should also be marked Dirichlet automatically. Can you perhaps add a small complete example, i.e. especially including level set function and geometry?

For the second issue: As of now we are not supporting the Integation-Symbol-notation ds/dx of NGSolve yet (due to some software interfacing problems that we haven't really addressed yet), i.e. you should work with SymbolicLFI on the boundary to obtain the Robin-type boundary integrator.

Best,
Christoph
More
3 years 10 months ago #2851 by nepomuk
Replied by nepomuk on topic XFEM dirichlet bc
Hi Christoph,

Here's my jupyter-file. I already tried with SymbolicLFI, I got a similar error...
Thanks for helping!

BR,Nepomuk
Attachments:
More
3 years 10 months ago #2854 by schruste
Replied by schruste on topic XFEM dirichlet bc
Dear Nepomuk,

The Dirichlet-thing was a bug, actually two. This is now fixed in the current master on github.

The boundary integral thing is a missing feature. First of all, you need to switch to two integrals and corresponding neg/pos-evaluations. However, to make the boundary-evaluations we need boundary evaluators which are not implemented, admittedly. I will put this on the xfem-ToDo-List.

Best,
Christoph
Time to create page: 0.111 seconds