Reducing number of requests for get_result_table()

To minimise the number of requests, I add all elements (nodes, members, joints, etc.) to a list and send them to the program together with one single request.

for example:

rfemLstNodes.append(rfem.structure_core.Node(no=1, coordinate_1=0.000, coordinate_2=0.000, coordinate_3=0.000))
rfemLstNodes.append(rfem.structure_core.Node(no=1, coordinate_1=1.000, coordinate_2=0.000, coordinate_3=0.000))

# combine all single lists to one list
lstNewObjects = [*rfemLstHinges,
                 *rfemLstNodes,				 
                ]

# update model
rfem_app.create_object_list(lstNewObjects)

Is the minimised request option also available for retrieving results with the "RFEM_app.get_result_table(" command or do these always have to be queried individually?

df_results_NODES_GLOBAL_DEFORMATIONS_table = rfem_app.get_result_table(
	table = rfem.results.ResultTable.STATIC_ANALYSIS_NODES_GLOBAL_DEFORMATIONS_TABLE,
	loading = rfem.ObjectId(
		no = 1,
		object_type = rfem.OBJECT_TYPE_DESIGN_SITUATION
	)
).data

df_results_SURFACES_GLOBAL_DEFORMATIONS_table = rfem_app.get_result_table(
	table = rfem.results.ResultTable.STATIC_ANALYSIS_SURFACES_GLOBAL_DEFORMATIONS_TABLE,
	loading = rfem.ObjectId(
		no = 1,
		object_type = rfem.OBJECT_TYPE_DESIGN_SITUATION
	)
).data

Yeah I'm also exploring this at the moment. I'm working with:

df_internal_forces_table = rfem_app.get_result_table(
    table=rfem.results.ResultTable.STATIC_ANALYSIS_SURFACES_LOCAL_DEFORMATIONS_TABLE,
    loading=rfem.ObjectId(
        no=1,
        object_type=rfem.OBJECT_TYPE_LOAD_COMBINATION
    )
).data

From my understanding, ObjectId can only contain one load case, so it's going to get very expensive to find the max deflection across multiple load cases...

I tried to use ObjectIdList to see if you could create a list of load cases and pass that in, but I got:

TypeError: Parameter to MergeFrom() must be instance of same class: expected <class 'dlubal.api.rfem.object_id_pb2.ObjectId'> got <class 'dlubal.api.rfem.object_id_pb2.ObjectIdList'>.

(which makes sense, as the documentation says loading should be an ObjectId — I just thought I'd see if a list works)

Curious to see how we can get all the load combinations for a table with just one request.

Hi Thomas and Samuel,

Thanks a lot for the great feedback!
You're absolutely right—currently the loading parameter expects a single ObjectId, so querying multiple load cases or combinations in one get_result_table call isn't directly supported.

However, we already allow this in upcoming calculate_specific method, where you can pass a list of load cases, combinations etc., like this:

rfem_app.calculate_specific(
    loading=[
        rfem.ObjectId(no=5, object_type=rfem.OBJECT_TYPE_LOAD_COMBINATION),
        rfem.ObjectId(no=7, object_type=rfem.OBJECT_TYPE_LOAD_CASE)
    ]
)

So we’ll investigate if this approach can also be applied to get_result_table to allow querying results across multiple loadings in a single request.

Stay tuned! :wink:

3 Likes

Hi Samuel,

to get results over multiple load cases you can use:

object_type=rfem.OBJECT_TYPE_DESIGN_SITUATION

instead of:

object_type=rfem.OBJECT_TYPE_LOAD_COMBINATION

In my situation i was looking for results for "NODES_"- and "SURFACES_"-Deformations, where i need two request at the moment.
Maybe it will be possible to minimise both requests into one and get a list with both results.

4 Likes

Thomas you legend that works perfectly!
Thanks so much :slight_smile:

:glowing_star: Exciting Webinar Coming Soon! :glowing_star:

We are pleased to announce an upcoming webinar focused on the topic of results! This will be a fantastic opportunity to gain valuable insights and deepen your understanding.

:link: Register for the Webinar Here

Don't miss out on this informative session! :date::sparkles:

2 Likes