Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal displacement boundary condition in linear elasticity problems #949

Closed
JanSuntajs opened this issue Oct 20, 2023 · 3 comments
Closed

Comments

@JanSuntajs
Copy link

Hello,

I would like to know whether there exists a straightforward way to introduce normal displacement
boundary conditions in linear elasticity problems, as follows:
$$\vec{u} \cdot \vec{n} = g.$$
Here, $\vec{u}$ is the displacement vector and $\vec{n}$ the surface normal at the boundary $\partial\Omega$.
I have inspected Tutorial 7 on Raviart-Thomas spaces
where such case is mentioned briefly, but I am unsure whether RT spaces are applicable (or suitable) in my case,
as I am no expert on various intricacies of FEM. Below is an outline of my problem:

I am implementing a stress enhanced diffusion problem in Gridap, which consists of coupled
linear elasticity and diffusion problems. In implementation of the linear elasticity part, I
have followed Tutorial 3 of the Github documentation
and my meshing routines [not included here as they are not essential to the problem] allow for creation
of meshes for box-like, cylindrical and spherical geometry. Particularly for the latter two cases, it would be convenient if I could specify the normal displacement boundary condition as stated above.

Could this simply be achieved using proper commands at the test and trial spaces generation step?
Currently, I use the following function to generate the needed function spaces for the problem:

using Gridap

function _prep_tags!(tags)

    for i in eachindex(tags)

        if isempty(tags[i])
            #
        else
            tags[i] = Vector{String}(tags[i])
        end

    end

end

"""
A routine for generating FEM spaces; specifically,
fields to assemble our multi-field problem.
"""
function generate_spaces(model, dirichlet_tags, dirichlet_funcs,
	dirichlet_masks, order = [1, 1])

    _prep_tags!(dirichlet_tags)
	# generation for the elastomechanic problem
	reff_e = ReferenceFE(lagrangian, VectorValue{3, Float64}, order[1])
    reff_c = ReferenceFE(lagrangian, Float64, order[2])

    # handle the cases with specified Dirichlet boundary
    # conditions differently than the ones without them
    # the same is repeated for the chemical part
    if !(dirichlet_tags[1] == [""])
        V_e = TestFESpace(model, reff_e; conformity = :H1,
            dirichlet_tags = dirichlet_tags[1],
            dirichlet_masks = dirichlet_masks[1])
        U_e = TrialFESpace(V_e, dirichlet_funcs[1])
    else
        V_e = TestFESpace(model, reff_e; conformity = :H1,)
        U_e = TrialFESpace(V_e)
    end

	println("generated the elastomechanic part!")
	# generation for the diffusion problem
    if !(dirichlet_tags[2] == [""])
        V_c = TestFESpace(model, reff_c,
        dirichlet_tags = dirichlet_tags[2],
        dirichlet_masks = dirichlet_masks[2]
        )
        U_c = TrialFESpace(V_c, dirichlet_funcs[2])

    else
        V_c = TestFESpace(model, reff_c)
        U_c = TrialFESpace(V_c)
    end

	println("generated the chemical part!")
	return U_e, U_c, V_e, V_c
end

Could I impose the desired constraint above or should I do it when specifying the weak form, for instance by introducing some Lagrange multiplier?

Thank you for your response and keep up the good work with Gridap!

@santiagobadia
Copy link
Member

Hi @JanSuntajs

If the normal corresponds to one of the axes of your coordinate system, it is straightforward.
You can simply use dirichlet_masks to decide which conditions you want to impose.
E.g., in 2D, you would use (true, false) to fix the x-component.
You must pass one array of these tuples for each Dirichlet tag.
Search for dirichlet_masks in the Gridap project to find some tests using this machinery.

The situation is more complicated if the normal component is not aligned to an axis on the surface.
Probably the easiest way to go is to impose conditions weakly (see the unfitted and DG tutorials).

@JanSuntajs
Copy link
Author

@santiagobadia , thank you for your comment!

I am already using Dirichlet masks in cases when they are applicable, as can be seen from my code snippet above. This is why I also assumed some similar functionality existed in Gridap for more general geometries.

The situation is more complicated if the normal component is not aligned to an axis on the surface. Probably the easiest way to go is to impose conditions weakly (see the unfitted and DG tutorials).

If I understood this part of the answer correctly, the way to go in my case would be to apply the Nitsche's method to the weak form of my linear elasticity problem and proceed from there?

@santiagobadia
Copy link
Member

If I understood this part of the answer correctly, the way to go in my case would be to apply the Nitsche's method to the weak form of my linear elasticity problem and proceed from there?

Yes, that would be easier.

If you have a linear approximation of a geometry, the normal component does not even make pointwise sense. So, it is not straightforward to impose the normal constraint strongly.

If the normal is continuous, you can enforce the normal boundary condition using linear constraints. But this will require a low level implementation of the constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants