1. I have created the following geometry using CellData class. Now I wanted to
calculate stresses and strains under dirichlet and Neumann boundary conditions
for the attached triangulation.
For strain calculations I have used the DataPostprocedure tensor class, but my
problem is how to calculate stress while there are two materials in the same
domain?
I see from your picture that you have already used the material_id to mark
which cells are which. You can access the material_id of the cell you are
currently working on from the DataPostprocessor object: The
DataPostprocessorInputs object you are handed in the evaluate() function gives
an example of how to do that:
https://dealii.org/developer/doxygen/deal.II/structDataPostprocessorInputs_1_1CommonInputs.html
2. I am also facing difficulty calculating single material, I tried the
procedure which is mention in documentation that multiply strain with
stress-strain tensor (considering lambda=1, mu =1), see below
image.png
but I am getting the following error:
error: invalid operands of types ‘dealii::Tensor<1, 2>::value_type’ {aka
‘double’} and ‘int [3][3]’ to binary ‘operator*’
68 | = ((input_data.solution_gradients[p][d][e]
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | +
| ~
70 | input_data.solution_gradients[p][e][d]) / 2)*C;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
Well, what data type do you use for 'C'? The error message says something
about int[3][3], but it's not clear to me what that is. Can you show the code
you use?
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/51e9c05a-78df-628c-d7af-5fcfcbb8d5fd%40colostate.edu.