Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Operator for 2D Element Area #1201

Closed
MichaelBThompson opened this issue Oct 12, 2023 · 5 comments
Closed

Add Operator for 2D Element Area #1201

MichaelBThompson opened this issue Oct 12, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@MichaelBThompson
Copy link

Description of the feature

It is good to be able to get the area of 2D elements as a function of time as they deform in an analysis. Most common use would be contact area. Add an operator that can calculate the area of the 2D element faces and return a fields container of element->Area. Could also make an option in the operator to return the total area (summation). This could also be done in linking to the summation operator, but an option in this one would be useful.

Steps for implementing the feature

add operator

Useful links and references

No response

@MichaelBThompson MichaelBThompson added the enhancement New feature or request label Oct 12, 2023
@MichaelBThompson MichaelBThompson changed the title Add Operator for Area Add Operator for 2D Element Area Oct 12, 2023
@PProfizi
Copy link
Contributor

@MichaelNale

@mikerife
Copy link

Hi @MichaelBThompson @MichaelNale
In Mechanical APDL most elements that are 3D (i.e. have 3 dof's) but are 2D in shape (like contact174) store their area within the 'volume place' in the result file. I created a small actual 2D test model (plane183) with contact172 bonding two parts each meshed with just 1 element. The final 'volume' of the contact element should be 2 (plane strain assuming unit thickness). The units will be volume but it is really an area. The model is two unit squares stretched in one direction by 1 unit.

from ansys.dpf import core as dpf
import os
result_file = r"file.rst"
DS = dpf.DataSources(result_file)
model = dpf.Model(DS)
mesh = model.metadata.meshed_region
contact_elem = dpf.mesh_scoping_factory.elemental_scoping([3])
contact_area = dpf.operators.result.elemental_volume()
contact_area.inputs.mesh_scoping.connect(contact_elem)
contact_area.inputs.data_sources.connect(DS)
contactArea = contact_area.outputs.fields_container()

And it does return the right value, though with the wrong units (which is expected):

image

Perhaps of more importance is the contacting area which can be retrieved via a NMISC item (retrieving nmisc and smisc items already have operators). The name is CAREA.

Mike

@MichaelBThompson
Copy link
Author

MichaelBThompson commented Oct 13, 2023 via email

@PProfizi
Copy link
Contributor

PProfizi commented Oct 13, 2023

Hi @MichaelBThompson,

It sounds to me like the operator elements_facets_surfaces_over_time may do what you want.

@MichaelBThompson
Copy link
Author

@PProfizi , you are correct that this operator does the requested actions to get the surface areas over time. I would suggest a rename of this operator to something with surface area, but I understand if renaming is more work than is worth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants