PSI - Issue 78
Stefano Ercolessi et al. / Procedia Structural Integrity 78 (2026) 1497–1504
1500
Listing 2. TCLgenerator: addSystem declaration. / / Add System void addSystem ( const std :: string& type );
Moreover, it is possible to extensively exploit the C ++ function overloading capabilities to define functions sharing the same name, but accepting di ff erent types of input, each tailored to generate appropriate TCL commands declina tions. This paradigm proves particularly practical when combined with the definition of Gmsh physical groups, which often results in geometric entities being organized as vectors of identifiers. A typical example in FEA is the definition of the multi-point constraints (e.g. rigidLink , equalDOF , etc), which require the specification of one or more primary and secondary nodes, depending on the modelling situations. Function overloading, allows the user to implement a family of functions, sharing the same name, that operate seamlessly on di ff erent input formats, thereby improving both flexibility and code readability without sacrificing consistency in the TCL generation (c.f. Code snippet 3).
Listing 3. Function overloading example for rigidLink elements in TCLgenerator. / / Write rigidLink MPC void writerigidLinkElement ( std :: string& type , std :: size t& rNodeTag , std :: size t& cNodeTag); void writerigidLinkElement ( std :: string& type , std :: size t rNodeTag , std :: vector < std :: size t > & cNodeTag );
Another key strength of this approach lies in the possibility, which is given to the user include custom functions, which can be written to support problem-specific modelling requirements within the OpenSees framework. Further more, the use of C ++ not only enables high flexibility and customization but also opens up significant opportunities for further development and extension. This design philosophy allows researchers and developers to tailor the code structure according to the specific needs of their simulations, promoting reusability and scalability in complex model scenarios. Once the TCL scripts are generated, the analysis can be executed directly using the conventional OpenSees workflow, ensuring full compatibility with both the sequential and parallel versions of the framework.
2.3. OpenSees analysis and post-processing
OpenSees can export simulation outputs in a variety of formats, depending on user requirements. To leverage the powerful visualization capabilities of ParaView, it is necessary to configure the recorders to produce output in the PVD format. However, in its standard distribution, the OpenSees PVD recorder does not support the extraction of stress and strain tensors for two- and three-dimensional finite elements. To address this limitation, the source code of the PVD recorder and related classes—specifically the element class and its two- and three-dimensional derivatives—have been extended to include the necessary methods for retrieving and exporting stress and strain data. It is worth noting that OpenSees is based on a strain-driven finite element formulation, where deformations are imposed by the kernel and the corresponding stresses are computed at the Gauss points within each element. Stress and strain quantities are re trieved at the element level, typically as averages over all Gauss points for stresses. To enable post-processing through ParaView, the PVDrecorder class has been extended to allow the selection and export of individual or complete sets of stress and strain components. Additionally, the element base class has been augmented with pure virtual methods ded icated to returning stress and strain data. These methods must be implemented in each derived element class of interest to support this extended functionality. Once the analysis is complete, the generated PVD output files can be opened in ParaView to perform visualization and further evaluation of the results. Moreover, ParaView is designed with a client-server architecture that enables e ffi cient parallel processing of large dataset. The server component, which can be deployed on high-performance computing clusters, handles the intensive data processing and rendering tasks in parallel, distributing the workload across multiple processors or nodes. Meanwhile, the client, typically running on a user’s desktop or laptop, provides an interactive graphical interface to control the visualization and analysis workflow remotely. This separation of duties allows ParaView to scale e ff ectively with data size and computational resources, making it particularly well-suited for handling complex simulations and large-scale finite element datasets. The par allel capabilities of ParaView thus enable researchers to perform interactive visualization and data analysis even on very large datasets that would be infeasible to process on a single machine.
Made with FlippingBook Digital Proposal Maker