getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-users] Discontinous stress field ?


From: Antoine Mazuyer
Subject: [Getfem-users] Discontinous stress field ?
Date: Sat, 3 Feb 2018 20:54:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Dear all,

I use getfem to solve a 3D isotropic elastic problem, using a displacement based FEM

To compute the stress, I have wrote this method:

void getfem_compute_stress(
        getfem::model &md,
        const std::string &varname,
        const std::string &data_lambda,
        const std::string &data_mu,
        const getfem::mesh_fem &mf_stress,
        getfem::model_real_plain_vector &stress )
    {
        const getfem::mesh_fem *mfu = md.pmesh_fem_of_variable( varname );
        GMM_ASSERT1( mfu, "The variable should be a fem variable" );
        getfem::size_type N = mfu->linked_mesh().dim();
        std::string sigma = data_lambda + "*Div_" + varname + "*Id(meshdim)+"
            + data_mu + "*(Grad_" + varname + "+Grad_" + varname + "')";
        getfem::ga_interpolation_Lagrange_fem( md, sigma, mf_stress, stress );
    }

  • md is the model I use to solve the FEM problem
  • varname is "u" for the displacement
  • data_lambda is "lambda"
  • data_mu is "mu"
  • mf_stress is a getfem::mesh_fem built with "classical discontinuous element"
  • stress is a vector where the stress will be store


It works like a charm, when I try to visualize the results on paraview, the stress results are good... but there are continuous !

I am expecting discontinuous result... because I have computed the displacement field using linear elements, so the stress has to be constant on each cell.

How can I manage to obtain this kind of result ? I don't want the stress field to be interpolated ...

Best regards,

Antoine Mazuyer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]