ansys / pydpf-core

Data Processing Framework - Python Core
http://dpf.docs.pyansys.com/
MIT License
67 stars 25 forks source link

cms_matrices_provider should return matrix indexation table #83

Open SheBeLo opened 3 years ago

SheBeLo commented 3 years ago

I've tried the following code:

f_sub = r'C:\path\to\file.sub'

ds  = dpf.DataSources(f_sub) 
sub = dpf.Operator('cms_matrices_provider')  # operator instantiation
sub.inputs.data_sources.connect(ds)
sub_fields = sub.outputs.fields_container()
for field in sub_fields : print(field)

There seems to be only three fields: stiffnes_matrix, mass_matrix and load vector.

In order to use these matrices, additional information is needed. With APDL Math, we used to retrieve:

The DST table is used to know to which couple (node, dof) corresponds each row of the matrices, often called matrix indexation table. Without that indexation table, usage if mass and stiffness matrices are very limited.

DST is calculated with the following rule: DST = (NODE-1)*numdof+DOF I'm not sure if the best is to :

rlagha commented 3 years ago

@SheBeLo yes you are definitely right, We will add those outputs and get back to you.