Package: lmcv-tools
LMCV Tools1 - IntroductionLMCV Tools is acommand line toolthat provides a series of useful functionalities for the day-to-day simulations of the "Laboratório de Mecânica Computacional e Visualização" of the "Universidade Federal do Ceará" (UFC).1.1 - Install$ pip install lmcv_tools1.2 - Update to Last Version$ pip install --upgrade lmcv_tools1.3 - Build and Install from Source$ pip install build
$ python -m build
$ pip install dist/[name of wheel file].whl1.4 - How to UseOnce installed, the basic form of the LMCV Tools commands is:$ lmcv_tools [command] [flags] [args]To check the installed version, use the command below:$ lmcv_tools versionTo get help, it's possible use the following command:$ lmcv_tools helpTo startInteractive Mode, do not type any command and then you can type multiple commands in sequence:$ lmcv_tools
[Welcome Message]
>> [command]
output
>> [other command]
other outputFor more complex commands, check out the detailed descriptions in the next section.2 - Complex CommandsConsidering that the routine activities for which LMCV Tools was developed are quite varied, specific commands were developed for each one of them. These commands are:translate (in implementation)extract (in implementation)generate (in implementation)reorderchange (in implementation)2.1 - TranslateThe commandtranslate, in short, aims to convert different types of files used in LMCV.Its usage is quite simple:$ lmcv_tools translate [path/to/file] to [extension]2.1.1 - Translate .inp to .datAbaqus is a suite for Finite Element Analysis (FEA) developed by "Dassault Systèmes", while FAST is a console based FEA tool developed by "Laboratório de Mecânica Computacional e Visualização" of "Universidade Federal do Ceará" (UFC). Both of these softwares can simulate complex problems, but FAST has a clear disadvantage: differently of Abaqus, it hasn't a native GUI to generate its meshes. With that in mind, this command specifically seeks to translate meshes generated in Abaqus and exported in .inp format into meshes in .dat format to be used in FAST simulations.Example:$ lmcv_tools translate Job-1.inp to .dat2.1.2 - Translate .dat to .svgArticles for scientific publications in the LMCV study field generally require images of the used meshes. Generating bitmat images in PNG format is a valid possibility, but for very discretized meshes this approach results in loss of details. Thinking about it, this command translates .dat files ofplate and shellmeshes to the SVG (Scalable Vector Graphics) image format, which does not lose quality with zoom (perfect for meshes with many elements).Example:$ lmcv_tools translate Plate.dat to .svgIn addition, this command variation has an optional argument to choose the projection type. The supported projection types are listed bellow:plane_xy (default)plane_yzplane_xzisometricExample:$ lmcv_tools translate Plate.dat to .svg isometric2.2 - ExtractThe commandextract, in short, aims to extract data from .pos (or .dat) files generated by FAST and save this data in CSV format.Files with extension ".pos" are the standard output from FAST simulations. They can store data about nodal displacements, element stresses, gauss points stresses and other informations, all distributed over a series of steps. In some contexts, it is necessary to obtain specific data from these files, but the manual search can take a lot of time and still fail. Alternatively, this command allows to extract entire set of related atributes by a simple expression.An extraction expression can be broken down into terms:KeywordsAttributesConditionKeywordsare a set of words that define the commmand syntax. In this command, the keywords are "from", "where" and "to" (the last two are optional). Examples of valid syntaxes are:$ lmcv_tools extract [atributes] from [path/to/.pos]
$ lmcv_tools extract [atributes] from [path/to/.pos] to [path/to/.csv]
$ lmcv_tools extract [atributes] from [path/to/.pos] where [condition]
$ lmcv_tools extract [atributes] from [path/to/.pos] where [condition] to [path/to/.csv]Attributesare names that represent a piece of data from a .pos file. The supported attributes are:AttributeTypeSub-TypeRelated Attributesstep.idint--step.factorfloat-step.idnode.idint--node.coordlistfloatnode.idstep.node.displacementlistfloatstep.id, node.idstep.gauss.scalarliststrstep.idstep.nodal.scalarliststrstep.idelement.idint--element.infolistintelement.idstep.element.gauss.scalar.datalistfloatstep.id, element.idstep.element.nodal.scalar.datalistfloatstep.id, element.idbuckling.idint--buckling.factorfloat-buckling.idbuckling.node.displacementlistfloatbuckling.id, node.idvibration.idint--vibration.factorfloat-vibration.idvibration.node.displacementlistfloatvibration.id, node.idmaterial.idint--material.isotropic.Efloat-material.idmaterial.isotropic.poissonfloat-material.id, material.isotropic.Esection.idint--section.bar.circle.radiusfloat-section.idAttributes that share any related attributed can be related in order which they were typed. Example:$ lmcv_tools extract step.id step.factor step.node.displacement[0] from Example.posConditionis a series of attribute constraints. They can be written intuitively using attributes, operators and test values after "from" keyword. The supported operators are:OperatorMeaningandLogical and.orLogical or.=Relational equal to.>Relational gerater than.<Relational less than.>=Relational gerater than or equal to.<=Relational less than or equal to.!=Relational different from.inRelational membership.Remembering that the symbols ">" and "<" must be encapsulated by quotes. Otherwise, they will be interpreted by the shell asredirection operators.Examples:$ lmcv_tools extract step.factor from Example.pos where step.id ">" 2$ lmcv_tools extract step.factor from Example.pos where step.id != 3 and step.factor ">" 32.3 - GenerateThe commandgenerate, in short, aims to create special artifacts.Artifact is a broad term for anything that can be useful for LMCV simulations. They can be file templates, dynamically generated file parts or anything else that needs a shortcut to create.Possible Syntaxes:$ lmcv_tools generate [artifact name]
$ lmcv_tools generate [artifact name] [args] [path/to/artifact]Implemented artifacts are listed below:virtual_laminascuboid2.3.1 - Virtual LaminasVirtual Laminas (virtual_laminas) are a model that approximates the behavior of a Functionally Graded Material. The idea is to represent these materials as a stack of isotropic homogeneous laminas. The more laminas used, the more accurate the simulation results. However, tools like Abaqus or FAST do not have a fast and automated way to generate these laminas, so this artifact was developed as a solution.This syntax below will start a graphical interface to facilitate the process of passing arguments:$ lmcv_tools generate virtual_laminasOther syntax possible is based in a long and exaustive list of required arguments:$ lmcv_tools generate virtual_laminas [params] [path/to/virtual_laminas]ParametersTypeDescriptionLaminas CountintTotal number of laminas.Laminas ThicknessfloatThinkcness of laminas.Power Law ExponentfloatExponent of Power Law.Micromechanical ModelstrModel to calculate effective properties.Element TypestrSupported: Solid, Shell.E1floatElastic Modulus of Material 1.E2floatElastic Modulus of Material 2.nu1floatPoisson's Coefficient of Material 1.nu2floatPoisson's Coefficient of Material 2.pho1floatDensity of Material 1.pho2floatDensity of Material 2.Smart LaminasboolIf True, a new smart generation method will be used.Supported Micromechanical Models:voigtmori_tanakahashin_shtrikman_lower_boundhashin_shtrikman_upper_bound2.3.2 - CuboidCuboids are geometric shapes frequently used in simulation tests. Therefore, this artifact was created to allow the generation of finite element meshes of cuboids in .dat format.Proper Syntax:$ lmcv_tools generate cuboid [params] [path/to/cuboid]ParametersTypeDescriptionElement TypestrSupported: BRICK20.WidthfloatCuboid Width (x).HeightfloatCuboid Height (y).DeepfloatCuboid Deep (z).NxintNumber of Elements in Width.NyintNumber of Elements in Height.NzintNumber of Elements in Deep.2.4 - ReorderThe commandreorder, in short, aims to add a node solver order in .dat files to reduce the stiffiness matrix bandwidth and, consequently, the time spent to execute the simulation.Considering that computational simulations based on the finite element method involve the solution of a system of linear equations, it is possible to reduce the execution time of these simulations by also reducing the bandwidth of the stiffness matrix that represents the linear system. A valid approach for this is the reordering of the nodes that make up the simulation mesh. Thus, this command allows generating a reordering of nodes (a new node solver order) from different methods.Possible Syntax:$ lmcv_tools reorder [method] [path/to/.dat]Example:$ lmcv_tools reorder rcm simulation.datPossible Flags:FlagFunction-i or --infoShow info about bandwidth reduction and execution timeSupported Reordering Methods:KeywordMethodrcm[1]Reverse Cuthill-McKeesloan[2]Sloanboost_rcmBoost C++ Library Implementation of Reverse Cuthill-McKee Algorithmboost_sloanBoost C++ Library Implementation of Sloan Algorithm2.5 - ChangeThe commandchange, in short, aims to change certain values from .dat (or .pos) files generated by FAST.Files with extension ".dat" are the standard input from FAST simulations. They can store data about nodal coordinates, material properties, section details and other informations. In some contexts, it is necessary to change specific data from these files, but the manual process can take a lot of time and still fail. Alternatively, this command allows to precisely change specific atributes by a simple expression.In a similar way to the command extract, a change expression can be broken down into terms:KeywordsAttributesConditionKeywordsare a set of words that define the command syntax. In this command, the keywords are "to", "in" and "where" (the last is optional). Examples of valid syntaxes are:$ lmcv_tools change [atribute] to [value] in [path/to/.dat]
$ lmcv_tools change [atribute] to [value] in [path/to/.pos] where [condition]Attributesare names that represent a piece of data from a .dat (or .pos) file. They are the same as those used in the extract command. Example:$ lmcv_tools change material.isotropic.poisson to 0.3 in Example.datConditionis a series of attribute constraints. They can be written intuitively using attributes, operators and test values after "from" keyword, just like the command extract. However, in this specific case, only attributes related to the attribute that will be changed can be used in condition expressions. Example:$ lmcv_tools change material.isotropic.poisson to 0.3 in Example. where material.id = 23 - References[1] CUTHILL, E.; MCKEE, J.. Reducing the bandwidth of sparse symmetric matrices. Proceedings of The 1969 24th National Conference, Washington, p. 157-172, 26 ago. 1969. ACM Press.http://dx.doi.org/10.1145/800195.805928.[2] SLOAN, S. W.. An algorithm for profile and wavefront reduction of sparse matrices. International Journal for Numerical Methods in Engineering, Newcastle, v. 23, n. 2, p. 239-251, fev. 1986. Wiley.http://dx.doi.org/10.1002/nme.1620230208.