CAD LINGUISTIC SUPPORT
DOI:
https://doi.org/10.32782/mathematical-modelling/2025-8-2-6Keywords:
finite element method, linguistic support, translator, GIT, parallel algorithms, visualizationAbstract
The article presents an approach to developing linguistic support for computer-aided design systems based on the finite element method in modeling complex engineering and technical systems. It is shown that one of the most challenging stages in preparing input data for computation is the formalization of boundary conditions, loads, and heterogeneous physical properties, especially in cases of complex or non-standard geometry of the computational domain. To automate this process, the authors have developed a specialized C++ class library that enables the description of the physical and geometric characteristics of an object, boundary conditions, and loads in the form of formulas written in a domain-specific language whose syntax closely resembles that of the Python programming language. The main focus is on the development of an interpreter for functional expressions that describe physical parameters and boundary conditions. The paper provides a detailed discussion of the process of translating arithmetic and logical expressions into an abstract syntax tree, which serves as the basis for further evaluation of values at the nodes of the finite element model corresponding to predefined selection conditions. The structure of the Parser class is presented, implementing the main stages of translation: lexical and syntactic analysis, construction and storage of the parse tree, as well as expression evaluation. The algorithm for scanning the input code, recognizing lexemes—such as numeric constants, operators, and identifiers—and generating the corresponding tokens is described. A UML-diagram of class Node, which encapsulates the abstract syntax tree, is provided, along with an example implementation of a recursive method that directly performs the evaluation. An important feature of the developed interpreter is its ability to dynamically load the coordinates of finite element model nodes into the abstract syntax tree without the need for code recompilation, which increases the system’s flexibility and extensibility. The software implementation of the parser is designed for use as part of specialized software for computer modeling of the strength and durability of complex engineering and technical systems under design.
References
Zienkiewicz O.C., Taylor R.L., Zhu J.Z. The Finite Element Method: Its Basis and Fundamentals. Sixth edition. Butterworth-Heinemann, 2016. 753 p.
Ansys. Engineering Simulation Software. URL: https://www.ansys.com/ (дата звернення: 23.08.2025).
MSC Nastran – Multidisciplinary Structural Analysis. URL: http://surl.li/schezo (дата звернення: 23.08.2025).
FreeFEM – An open-source PDE Solver using the Finite Element Method. URL: https://freefem.org/ (дата звернення: 23.08.2025).
Best Open-Source Finite Element Analysis Software. URL: http://surl.li/vmblnr (дата звернення: 23.08.2025).
Calçado P. Domain-Specific Languages (Unfinished Draft). URL: http://philcalcado.com/content/research_on_domain_specific_languages.html (дата звернення: 31.08.2025).
Cooper K.D., Torczon L. Engineering a Compiler. 3rd Edition. Morgan Kaufmann, 2022. 848 p.
Python.org. URL: https://www.python.org/ (дата звернення: 01.09.2025).
Aho A., Ullman J., Sethi R., Lam M. Compilers: Principles, Techniques, and Tools 2nd Edition. Addison Wesley, 2006. 1040 p.
QFEM/core/parser/. URL: https://surl.lt/pdmjly (дата звернення: 23.08.2025).







