-
Notifications
You must be signed in to change notification settings - Fork 25
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
Comments
Hi @MichaelBThompson @MichaelNale 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): 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 |
Nice work @mike ***@***.***>.
One other use case might be to know the area of a load application like pressure. This could be pressure with surface effect elements but could also be directly applied to solid element faces.
An ideal way to get this area data would be to calculate it via DPF rather than get it from the stored results file. This way we could still get it from a skin mesh that is created via DPF. We have a similar operator that calculates element normals. Adding area in the same way would be my suggestion, but also good to know about the ways to get info on contacts with existing methods.
Mike Thompson / Applications Engineer
407-625-7304
***@***.*** / www.ansys.com
…________________________________
From: Mike Rife ***@***.***>
Sent: Thursday, October 12, 2023 10:02:55 PM
To: ansys/pydpf-core ***@***.***>
Cc: Michael Thompson ***@***.***>; Mention ***@***.***>
Subject: Re: [ansys/pydpf-core] Add Operator for 2D Element Area (Issue #1201)
[External Sender]
Hi @MichaelBThompson<https://github.com/MichaelBThompson> @MichaelNale<https://github.com/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]<https://user-images.githubusercontent.com/91209185/274773220-0d5e7e07-c8d5-43ae-a489-08b4469486c4.png>
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
—
Reply to this email directly, view it on GitHub<#1201 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AY3ECFVD3BLLKTVKHTINZPDX7COM7AVCNFSM6AAAAAA55X2CSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRQGY2TIMJRGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
It sounds to me like the operator elements_facets_surfaces_over_time may do what you want. |
@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. |
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
The text was updated successfully, but these errors were encountered: