Results Axes System#
![]() |
In this example we will demonstrate how to:
|
from dlubal.api import rfem
with rfem.Application() as rfem_app:
# --- Retriev Nodes Support Forces from the active model (already calculated) ---
# a) Local Coordination System = Default
df_reactions_local = rfem_app.get_results(
results_type=rfem.results.ResultsType.STATIC_ANALYSIS_NODES_SUPPORT_FORCES,
).data
print(f"\nNodes Support Forces | Local (default):")
print(df_reactions_local)
# b) Global Coordination System
df_reactions_global = rfem_app.get_results(
results_type=rfem.results.ResultsType.STATIC_ANALYSIS_NODES_SUPPORT_FORCES,
nodal_support_coordinate_system=rfem.results.settings.CoordinateSystem.COORDINATE_SYSTEM_GLOBAL
).data
print(f"\nNodes Support Forces | Global:")
print(df_reactions_global)
# --- Retriev Member Internal Forces from the active model (already calculated) ---
# a) Member Local Axes (y, z) = Default
df_forces_local = rfem_app.get_results(
results_type=rfem.results.ResultsType.STATIC_ANALYSIS_MEMBERS_INTERNAL_FORCES,
filters=[
rfem.results.ResultsFilter(
column_id='loading',
filter_expression='DS1'
)
]
).data
print(f"\nMember Internal Forces | Local Axes (y, z) = Default:")
print(df_forces_local)
# Principal Axes (u, v)
df_forces_principal = rfem_app.get_results(
results_type=rfem.results.ResultsType.STATIC_ANALYSIS_MEMBERS_INTERNAL_FORCES,
member_axes_system=rfem.results.settings.MEMBER_AXES_SYSTEM_PRINCIPAL_AXES_X_U_V,
filters=[
rfem.results.ResultsFilter(
column_id='loading',
filter_expression='DS1'
)
]
).data
print(f"\nMember Internal Forces | Principal Axes (u, v):")
print(df_forces_principal)
# c) Member Local Axes Rotated (y, z) => (x, y)
base_data = rfem_app.get_base_data()
base_data.general_settings.local_axes_orientation = rfem.BaseData.GeneralSettings.LOCAL_AXES_ORIENTATION_YUPZ
rfem_app.set_base_data(base_data=base_data)
rfem_app.calculate_all(skip_warnings=True)
df_forces_rotated = rfem_app.get_results(
results_type=rfem.results.ResultsType.STATIC_ANALYSIS_MEMBERS_INTERNAL_FORCES,
member_axes_system=rfem.results.settings.MEMBER_AXES_SYSTEM_MEMBER_AXES_X_Y_Z
).data
print(f"\nMember Internal Forces | Local Axes Rotated (y, z) => (x, y)")
print(df_forces_rotated)
using Rfem = Dlubal.Api.Rfem;
using Microsoft.Data.Analysis;
using Dlubal.Api.Rfem;
ApplicationRfem? RfemApp = null;
try
{
RfemApp = new ApplicationRfem();
// --- Retriev Nodes Support Forces from the active model (already calculated) ---
// a) Local Coordination System = Default
DataFrame dfReactionsLocal = await RfemApp.get_results(
resultsType: Rfem.Results.ResultsType.StaticAnalysisNodesSupportForces
);
Console.WriteLine("\nNodes Support Forces | Local (default):");
Console.WriteLine(dfReactionsLocal);
// b) Global Coordination System
DataFrame dfReactionsGlobal = await RfemApp.get_results(
resultsType: Rfem.Results.ResultsType.StaticAnalysisNodesSupportForces,
coordinateSystem: Rfem.Results.Settings.CoordinateSystem.Global
);
Console.WriteLine("\nNodes Support Forces | Global:");
Console.WriteLine(dfReactionsGlobal);
// --- Retriev Member Internal Forces from the active model (already calculated) ---
// a) Member Local Axes (y, z) = Default
DataFrame dfForcesLocal = await RfemApp.get_results(
resultsType: Rfem.Results.ResultsType.StaticAnalysisMembersInternalForces
);
Console.WriteLine("\nMember Internal Forces | Local Axes (y, z) = Default:");
Console.WriteLine(dfForcesLocal);
// b) Principal Axes (u, v)
DataFrame dfForcesPrincipal = await RfemApp.get_results(
resultsType: Rfem.Results.ResultsType.StaticAnalysisMembersInternalForces,
memberAxesSystem: Rfem.Results.Settings.MemberAxesSystem.PrincipalAxesXUV
);
Console.WriteLine("\nMember Internal Forces | Principal Axes (u, v):");
Console.WriteLine(dfForcesPrincipal);
// c) Member Local Axes Rotated (y, z) => (x, y)
BaseData baseData = await RfemApp.get_base_data();
baseData.GeneralSettings.LocalAxesOrientation = BaseData.Types.GeneralSettings.Types.LocalAxesOrientation.Yupz;
await RfemApp.set_base_data(baseData);
await RfemApp.calculate_all(skipWarnings: true);
DataFrame dfForcesLocalRotated = await RfemApp.get_results(
resultsType: Rfem.Results.ResultsType.StaticAnalysisMembersInternalForces,
memberAxesSystem: Rfem.Results.Settings.MemberAxesSystem.MemberAxesXYZ
);
Console.WriteLine("\nMember Internal Forces | Local Axes Rotated (y, z) => (x, y)");
Console.WriteLine(dfForcesLocalRotated);
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
finally
{
if (RfemApp != null) await RfemApp.close_connection();
}