TensorMechanics coupling

351 views
Skip to first unread message

walkand...@gmail.com

unread,
Sep 22, 2017, 5:01:55 AM9/22/17
to moose-users
Dear all,
    I'm trying to use Moose's TensorMechanics module, it is really powerful.
    In my model, I have a stress field and concentration field.
    
    For the small strain elastic problem, the governing equation looks like:


where the epsilon is the small elastic strain defined as epsilon=(\nabla u+u\nabla^T)/2, c is the concentration.

For the diffusion problem, its governing equation looks like:


Now, I can use the TensorMechanics module for the first equation, and then define the strain depend on C. For the diffusion problem, I used a AuxKernel to compute the hydrostatic stress and use it as a coupled variable for the diffusion equaiton. Here is my input file:

******************************************

[Kernels]

  [./TensorMechanics]

    displacements = 'disp_x disp_y'

    use_displaced_mesh = false

  [../]

  [./ctime]

    type = TimeDerivative

    variable = c

  [../]

  [./diff]

    type = ExampleC

    variable =c

    D = 0.1

    couple_stress = hystress

  [../]

[]


[Materials]

  [./elasticity_tensor]

    type = ComputeIsotropicElasticityTensor

    youngs_modulus = 2.1e0

    poissons_ratio = 0.3

    use_displaced_mesh = false

  [../]

  [./strain]

    type = ComputeSmallStrain

    displacements = 'disp_x disp_y'

    eigenstrain_names = eigen_c

  [../]

  [./eigen_strain]

    type = ComputeVariableEigenstrain

    args = c

    eigen_base = '1 1 1 0 0 0'

    eigenstrain_name = eigen_c

    outputs = exodus

  [../]

  [./stress]

    type = ComputeLinearElasticStress

  [../]

[]


[AuxVariables]

  [./hystress]

    family = MONOMIAL

    order = FIRST

  [../]

[]

[AuxKernels]

  [./gethystress]

    type = RankTwoScalarAux

    rank_two_tensor = stress

    variable = hystress

    scalar_type = Hydrostatic

  [../]

[]

***************************************

In the [Materials] block, I tried to calculate the strain based on c(use the ComputeVariableEigenstrain), but this is just like one way coupling right? No contribution for K_{uc} ?


I think the final system matrix should be like the following right?


So I'm wondering:

1. TensorMechanic module is really powerful, so I want to use it for the elastic part, let's say the K_{uu} , then for the coupling part, is it possible that

I create a C++ class and inherit from TensorMechanics, and override the computeQpOffDiagnoalJacobian() function, then I can do the computation for K{uc}?

    

    I tried to #include "TensorMechaincs.h", but it seems I go to the wrong direction.

maybe there should have another better solutions for such kind problems.


2. For the diffusion part, K_{cc} is ok, very easy to implemenet. But for the K_{cu} part, since there the u is a vector, so inside the computeQpOffDiagnalJacobian function

we should give 

  if (jvar==_couple_sigma_var)

 {

     K_{cu}=(dR_{c}/dSigma)*(dSigma/du)

 }

this makes me confused, if we do the assemble things one by one, the K_{cu} term should take two positions right?


3. Is there any other examples or solutions for such TensorMechanics based coupling problem?  Any helpful suggestion is welcome!


Thank you all.


Best regards


Daniel Schwen

unread,
Sep 22, 2017, 11:22:16 AM9/22/17
to moose-users
c_ref does not seem to appear in your moose model. ComputeVariableEigenstrain requires a DerivativeParsedMaterial 'prefactor' argument! (that material would implement the c- c_ref term).


--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/6ee62f68-f840-479c-8c19-8deb045c06fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nicolog...@gmail.com

unread,
Sep 23, 2017, 7:33:22 AM9/23/17
to moose-users
You should look at the phase field fracture example. It is similar to what you are doing. c in that case is a damage phase field. It is in the tests of the tensor mechanics module and you can see how to add a piece of the Jacobian to the tensor mechanics part
Message has been deleted
Message has been deleted

walkand...@gmail.com

unread,
Sep 24, 2017, 10:09:44 AM9/24/17
to moose-users


在 2017年9月22日星期五 UTC+2下午5:22:16,Daniel Schwen写道:
c_ref does not seem to appear in your moose model. ComputeVariableEigenstrain requires a DerivativeParsedMaterial 'prefactor' argument! (that material would implement the c- c_ref term).


Hi Daniel, 
  Thank you sincerely for the reply. Follow your suggestion, now I can apply the eigen strain to the mechanical part. 
  I modified my input file as follow:
****************************************
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 14.8619240917
    poissons_ratio = 0.3
    use_displaced_mesh = false
  [../]
  [./strain]
    type = ComputeSmallStrain
    displacements = 'disp_x disp_y'
    eigenstrain_names = eigen_c
  [../]
  [./eigen_f]
    type = DerivativeParsedMaterial
    function = (c-0.5)/3.0
    f_name = f
    args = c
  [../]
  [./eigen_strain]
    type = ComputeVariableEigenstrain
    args = c
    eigen_base = '1 1 1 0 0 0'
    prefactor = f
    eigenstrain_name = eigen_c
    outputs = exodus
  [../]
  [./stress]
    type = ComputeLinearElasticStress
  [../]
[]
****************************************
I think it is correct, right? Where I take C_ref=0.5,Omega=1, the final strain is epsilon-(c-c_ref)/3*I ,I treat the (c-c_ref) as the pfactor, since I see in the code,
// Remove the Eigen strain
57  for (auto es : _eigenstrains)
58  _mechanical_strain[_qp] -= (*es)[_qp];
where I guess the es represent the eigen strain, it is computed via:


If I'm right, the TensorMechanics kernel used the small strain and C defined eigen strain to calculate the stress and do the simulation, has it also some contributions to the K_{uc} part? It looks like the one way coupling?

I checked several input files in modules/tensor_mechanics/test/tests/, there are many examples, that's really perfect. But I don't find these "OffDiagnal" things.

I followed nicolog's suggestion, and find that in  modules/combined/test/tests/phase_field_fracture/, the phase field method based fracture model's input file has such things, where it looks like:
**************************************
[./solid_x]
    type = PhaseFieldFractureMechanicsOffDiag
    variable = disp_x
    component = 0
    c = c
  [../]
  [./solid_y]
    type = PhaseFieldFractureMechanicsOffDiag
    variable = disp_y
    component = 1
    c = c
  [../]
**************************************
I think this is the coupling term: 
K_{Ux C}=(dR_ux/dc)
K_{Uy C}=(dR_uy/dc)

right?

Is it possible that I don't use the PhaseFieldFractureMechanicsOffDiag kernel(or module), but still can compute these OffDiag term, such as K_{uc}?
And how about these K{CU} term? the K_{cUx},K_{cUy}?


Thank you so much!

Best regards

walkand...@gmail.com

unread,
Sep 24, 2017, 10:12:36 AM9/24/17
to moose-users
Hi nicolog,
Thank you so much for the reply.
Your suggestion is really helpful.
I find the fracture model's test input file in  modules/combined/test/tests/phase_field_fracture/, the phase field method based fracture model's input file has such things, where it looks like:
**************************************
[./solid_x]
    type = PhaseFieldFractureMechanicsOffDiag
    variable = disp_x
    component = 0
    c = c
  [../]
  [./solid_y]
    type = PhaseFieldFractureMechanicsOffDiag
    variable = disp_y
    component = 1
    c = c
  [../]
**************************************

I think this is the coupling term: 
K_{Ux C}=(dR_ux/dc)
K_{Uy C}=(dR_uy/dc)

right?

It seems this is only for the PhaseFieldFracture kernel, is it possible that I don't use the PhaseFieldFractureMechanicsOffDiag kernel(or module), but still can compute these OffDiag term, such as K_{uc}? 

And how about these K{cU} term, the K_{cUx},K_{cUy}?


Best regards


在 2017年9月23日星期六 UTC+2下午1:33:22,nicolog...@gmail.com写道:

nicolog...@gmail.com

unread,
Sep 25, 2017, 7:21:38 AM9/25/17
to moose-users
Yes, PhaseFieldFractureMechanicsOffDiag computes the derivative of the displacement residual with respect to the phase field c (dR_ux/dc and dR_uy/dc)
You will have to write a new similar kernel that does that for your particular model.
The FDP preconditioner can calculate the Jacobian without you implementing an analytical expression, but this is slow.
I strongly suggest you to implement the kernel to calculate your off-diagonal terms, follow the instructions:
http://mooseframework.org/static/media/uploads/files/MOOSEPF_MARMOT_training_1_recap.pdf
http://mooseframework.org/wiki/MooseTraining/MultiphysicsCoupling/

walkand...@gmail.com

unread,
Sep 26, 2017, 3:27:55 AM9/26/17
to moose-users
Thank you Nicolog, this is really helpful for me!
Best regard

在 2017年9月25日星期一 UTC+2下午1:21:38,nicolog...@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages