Overwriting material property with region average #29750
-
Check these boxes if you have followed the posting rules.
QuestionI have a mesh in which a material property (logG) varies spatially (by element - monomial constant variables - ) over the ROI and is 0 elsewhere. Inside that same mesh, I also have a scale variable, which is 1 inside the ROI and 0 elsewhere. I want to compute the average of logG over the ROI and then overwrite the material property (logG) with this averaged value across the ROI and output this new mesh. Any idea how to implement this in a __.i file? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I would set up logG and scale as auxiliary variables using a ParsedAux (setting the 0 outside the ROI can be done here btw, as long as the definition of the ROI can be done in a if statement) Then integrate them separately using an ElementIntegralVariablePostprocessor. If either of these are already available as material properties, you can skip the ParsedAux step and use an ElementIntegralMaterialPostprocessor. Then use a ParsedPostprocessor to perform the quotient between the two integrals |
Beta Was this translation helpful? Give feedback.
I would set up logG and scale as auxiliary variables using a ParsedAux (setting the 0 outside the ROI can be done here btw, as long as the definition of the ROI can be done in a if statement)
Then integrate them separately using an ElementIntegralVariablePostprocessor.
If either of these are already available as material properties, you can skip the ParsedAux step and use an ElementIntegralMaterialPostprocessor.
Then use a ParsedPostprocessor to perform the quotient between the two integrals