RFEM
VIKTOR's RFEM integration requires a specific RFEM worker which can be downloaded here.
Analyzing an RFEM model in VIKTOR can be done using the
RFEMAnalysis
class (worker required). The RFEM model is
defined by:
- input .rfx file which has to be created manually
- list of actions which are to be performed sequentially
Creating the actions
The following actions can be defined:
Please click on the actions above to navigate to their reference for more detail on the meaning of each action.
from viktor.external.rfem import EnergyOptimizationAction, CopyNodalLoadAction, WriteResultsAction# SLSsls_cases = [1, 2, 3]sls_optimization = EnergyOptimizationAction(sls_cases, goal=10000, accuracy=0.1) # goal = 10 kNm, accuracy = 10 cm# ALSals_cases = [4, 5, 6]als_optimization = EnergyOptimizationAction(als_cases, goal=15000, accuracy=0.1) # goal = 15 kNm, accuracy = 10 cm# ULSuls_cases = [7, 8, 9]uls_creation = CopyNodalLoadAction(list(zip(sls_cases, uls_cases)), factor=1.5) # ULS = SLS x 1.5# Write actionwrite_result_action = WriteResultsAction(sls_cases + als_cases + uls_cases) # or can be left empty = all casesactions = [sls_optimization, als_optimization, uls_creation, write_result_action]
Running an RFEM analysis
The model can be fed to the RFEMAnalysis
as follows:
from viktor.external.rfem import RFEMAnalysis# Generate the input RFX file.input_file = ...# Run the analysis and obtain the results.analysis = RFEMAnalysis(input_file, actions=actions)analysis.execute(timeout=300)model = analysis.get_model()result_lc1 = analysis.get_result(load_case=1)result_lc2 = analysis.get_result(load_case=2)
caution
RFEMAnalysis.execute
needs to be
mocked within the context of (automated) testing.