Hi Animesh,

All of this seems reasonable to me. When you ask each PointHistory class instance for its stress etc., it will forward the call to the specific material instance that is initialised with one of the two sets of material parameters that you're setting in the parameters file.

Best,
Jean-Paul

On 10.11.20 12:54, Animesh Rastogi IIT Gandhinagar wrote:
Hi Jean-Paul,

There seem to be some inconsistencies in the simulations results that I am getting, therefore I wanted to check if I have applied the material laws properly accounting for the heterogeneities. Below, I have addted the edited functions that are responsible for that. Could you please let me know if there is something wrong here? I have checked the material properties (mu1, mu2 etc), and they are being read correctly by the code from the parameters file. I have also checked that the material ids (1 and 2) are correctly applied to the cells where I need them.

--------------------------------------
void setup_lqp (const Parameters::AllParameters &parameters, const unsigned int &materialid)
    {

    //Material 1 - Thin Film
if (materialid == 1)
    {
std::cout<<"1_id"<<std::endl<<parameters.mu1<<std::endl<<parameters.nu1<<std::endl;
      material.reset(new Material_Compressible_Neo_Hook_One_Field<dim,NumberType>(parameters.mu1,
                     parameters.nu1));
    }
    //Material 2 - Substrate
    if (materialid ==2)
    {
      material.reset(new Material_Compressible_Neo_Hook_One_Field<dim,NumberType>(parameters.mu2,
                           parameters.nu2));
    }

    }

-------------------------------------------

template <int dim,typename NumberType>
  void Solid<dim,NumberType>::setup_qph()
  {
    std::cout << "    Setting up quadrature point data..." << std::endl;

quadrature_point_history.initialize(triangulation.begin_active(),
                                        triangulation.end(),
                                        n_q_points);

    for (typename Triangulation<dim>::active_cell_iterator cell =
           triangulation.begin_active(); cell != triangulation.end(); ++cell)
      {
        const std::vector<std::shared_ptr<PointHistory<dim,NumberType> > > lqph =
          quadrature_point_history.get_data(cell);
        Assert(lqph.size() == n_q_points, ExcInternalError());

        for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
          lqph[q_point]->setup_lqp(parameters, cell->material_id());
      }
  }

--------------------------------------

Thanks!

Animesh
On Tuesday, November 3, 2020 at 12:09:03 PM UTC+5:30 Animesh Rastogi IIT Gandhinagar wrote:

    Hi Jean,

    Sorry for late response. Thank you for your detailed answer. Using
    your suggestions I was able to assign the material ids to
    different area of my domain of interest.

    Thanks again!

    Animesh

    On Tuesday, October 27, 2020 at 3:05:39 AM UTC+5:30 Jean-Paul
    Pelteret wrote:

        Dear Animesh,

        Let me preface my suggestion by saying that you can introduce
        some heterogeneity in more than one way. That is, you're not
        bound to using a material ID (which is what I'm going to
        suggest), but you could use some geometric arguments to
        determine which class or material properties should dictate
        the constitutive response at a continuum point. You also need
        not use the class-based structure that this code galley
        example has. There are other tutorials (e.g. step-8) that use
        Functions that return the material coefficients at any point
        in space. So you should keep that in mind as you read my
        suggestion.

        In my opinion, the simplest approach would be the following:

        1. The PointHistory::setup_lqp() function
        
<https://github.com/dealii/code-gallery/blob/master/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc#L720-L724>
        is the point at which the constitutive law at some quadrature
        point is set. So you should extend this function in some way
        to make a decision about which material it is in, and what the
        material law at that point is. The first thing that you might
        do is add an argument for the material ID, and then choose
        constiutitve parameters based on the material ID. You'll note
        that the concrete constitutive law is stored in a pointer.
        This makes it easy to extend to support other constitutive
        laws, because you can for example abstract the
        Material_Compressible_Neo_Hook_One_Field class into some base
        class and other classes (maybe a
        Material_Compressible_Mooney_Rivlin_One_Field) and then, based
        on the material ID, select which constitutive law is applied
        at that quadrature point.
        2. The PointHistory::setup_lqp() function is called from
        Solid::setup_qph()
        
<https://github.com/dealii/code-gallery/blob/master/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc#L1203-L1211>
        , and more specifically inside a loop over all cells. Its
        possible to retrieve the cell->material_id() or cell->center()
        (or, if you create a quadrature rule to help you then you can
        get the actual position of the quadrature point if you want
        such granularity). You can then pass this information in to
        PointHistory::setup_lqp() to help decide which constitutive
        law / parameters to apply. If using the material ID then you
        will, of course, want to set the material ID when building or
        reading in your triangulation.

        That is, at least, how I typically do things when using this
        code as a basis for extension. I hope that this helps you
        introduce heterogeneities into your problem!

        Best,
        Jean-Paul


        On 26.10.20 08:15, Animesh Rastogi IIT Gandhinagar wrote:
        Hello All,

        I am trying to solve the wrinkling problem of a thin stiff
        film attached to a soft substrate in dealii. I am using the
        code - from the code gallery for this purpose. For the
        simulations, I would have to consider the film and the
        substrate with different material properties.

        I understand that I would have to do something within the
        class Qudrature point history. However, I am getting a little
        confused on how to approach it. It would be great if someone
        could help me with this.

        This is the code that I am using for this purpose -
        
https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html
        
<https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html>

        Thanks!

        Animesh

-- The deal.II project is located at http://www.dealii.org/
        <http://www.dealii.org/>
        For mailing list/forum options, see
        https://groups.google.com/d/forum/dealii?hl=en
        <https://groups.google.com/d/forum/dealii?hl=en>
        ---
        You received this message because you are subscribed to the
        Google Groups "deal.II User Group" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to dealii+un...@googlegroups.com.
        To view this discussion on the web visit
        
https://groups.google.com/d/msgid/dealii/26db8831-e190-4fcd-8247-b7172ab880fen%40googlegroups.com
        
<https://groups.google.com/d/msgid/dealii/26db8831-e190-4fcd-8247-b7172ab880fen%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
The deal.II project is located at http://www.dealii.org/ <http://www.dealii.org/> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en <https://groups.google.com/d/forum/dealii?hl=en>
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com <mailto:dealii+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/bb943aa3-5ed0-437f-850c-56311e39e248n%40googlegroups.com <https://groups.google.com/d/msgid/dealii/bb943aa3-5ed0-437f-850c-56311e39e248n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/c1ecdce2-f04f-b195-215a-156353d1c1dd%40gmail.com.

Reply via email to