(components)= # Components ```xml ... ``` **Specification** - `` - Root element for the definition of each component. - `name` - Name of the component. - `type` - Type of the component. Choose one from 'laminate' and 'fill'. Default is 'laminate'. - `depend` - List of name of dependent components, delimited by commas. ## Laminate-type component For a cross section in PreVABS, laminates are created as segments. A segment is a unique combination of a base line and a layup. Segments are connected through different ways as shown [here](#fig-joints). According to this, segments can be grouped into components. The rule of thumb is: if two segments are connected in the first two ways ('V1' and 'V2'), then they belong to one component; if they are connected as the third way ('T'), then they should be put into different components, and component 2 will be created after the finish of component 1. ```{figure} /figures/joints.png :name: fig-joints :width: 6in :align: center Three types of connections that can be created in PreVABS. ``` A schematic plot of a segment is shown [here](#fig-segment). The base line provides a reference for the position and direction of the layup. Layers can be laid to the left or right of the base line. The direction is defined as one's left or right, assuming one is walking along the direction of the base line. ```{figure} /figures/segment.png :name: fig-segment :width: 6in :align: center A typical segment in PreVABS and the relation between base line direction and layup direction. ``` All segments definitions are stored in the main input file. The complete input will be discussed later since the overall configurations are also included in this file, which will be explained [here](#other-input-settings). Each component can have multiple segments. There are two ways to define segments. ### DEFINITION 1: Define segments individually Use a base line and a single layup to create the segment. In this way, the layup covers the entire of the base line. Each `` element has one attribute, `name`, and two child elements, `` and ``. The `` element has another attribute `direction` (see [](#fig-segment)). Joint of two connecting segments can be changed from 'V2' (default) to 'V1' by using a `` element. It requires the names of two segments, delimited by a comma (',') and an attribute `style` specifying the joint type. Example inputs for [](#fig-joints): ```xml baseline1 layup1 ... ... ... sgm_1,sgm_2 ... baseline2 layup2 ... ``` ### DEFINITION 2: Define segments collectively Use a base line and multiple layups to create multiple segments. Each layup can be assigned to a portion of the base line, using a beginning and an ending locations. These locations are normalized parametric positions on the base line. The beginning location must be smaller than the ending one. If the line is open, the location can only be a number between 0 and 1. If the line is closed, the location can be any number, even negative, as long as the length is not greater than 1. Then PreVABS will split the base line, combine layups and create segments automatically. ```xml l layup1 layup2 layup3 layup4 ``` Example: ```{figure} /figures/param_layup_example_design.png :name: fig-param_layup_example_define :width: 4in :align: center Segment layup range definition. ``` ```{figure} /figures/param_layup_example_plot.png :name: fig-param_layup_example_plot :width: 3in :align: center Segments plot. ``` ```xml base_line_3_name left layup_1_name layup_2_name layup_3_name layup_4_name ... ``` **Specification** *DEFINITION 1* - `` - Root element of the definition of the segment. - `name` - Name of the segment. - `` - Name of the base line defining this segment. - `` - Name of the layup defining this segment. - `direction` - Direction of layup. Choose one from 'left' and 'right'. Default is 'left'. - `` - Names of two segments delimited by a comma (',') that will be joined. - `style` - Style of the joint. Choose one from '1' and '2'. Default is '1'. *DEFINITION 2* - `` - Root element of the definition. - `` - Name of the base line definint these segments. - `` - Direction of the following layups. Choose one from 'left' and 'right'. Default is 'left'. - `` - Name of the layup. - `begin` - Normalized parametric beginning location of the layup on the base line. Default is '0.0'. - `end` - Normalized parametric ending location of the layup on the base line. Default is '1.0'. ## Fill-type component Besides creating laminates, user can use one material to fill a region. A typical usage is a nose mass in an airfoil type cross section. A schematic plot is shown [](#fig-filling1) ```{figure} /figures/filling1.png :name: fig-filling1 :width: 6in :align: center Example usage of a fill-type component as a nose mass in an airfoil cross section. ``` The key to this type of component is the indication of the fill region. There are two things to pay attention to. First, make sure that the boundary of the region is well-defined. The region can be surrounded by a number of components. User can also create some extra base lines as new boundaries. Second, locate the region where the material will be filled into. Then can be done by using a point inside the region, or if there are extra base lines, user can indicate the fill side with respect to one of the lines, similar to defining layup side in a segment. Fill-type components are also defined in the main input file. A template is shown in [](#code-fillings). A fill-type component is indicated by the attribute `type="fill"`. A `` child element is required. A `` element is optional and is used to create extra boundaries. This sub-element has one attribute `fillside`, which can be either left or right. A `` element is used to store the name of a point that is inside the desired fill region, and is also optional. ```{code-block} xml :linenos: :name: code-fillings :caption: Input syntax for the fill-type components. point_fill material1 bsl point_fill material1 0.1 bsl_3 material1 ``` ### Local mesh size Besides the mesh size set globally in the main input file, filling type components can be assigned local mesh sizes. This is usually for the purpose of reducing the total number of elements and computational cost. This feature is based on the embedded objects (points and lines) provided by Gmsh. Hence, one or more points need to be specified as the 'seed' of local mesh sizes. ```{code-block} xml 0.1 ``` The mesh size will vary gradually from the local to the global setting. Hence, if only one point is used, then the local mesh size will only affect a circular region. If multiple points are used, then lines will be created by connecting points seqentially and assigned the local mesh size as well. An example is provided below: ```{figure} /figures/local_mesh_define_mark.png :name: fig-local_mesh_example_define :width: 3in :align: center Local mesh definition. ``` ```{figure} /figures/local_mesh.png :name: fig-local_mesh_example_plot :width: 3in :align: center Local mesh plot. ``` ```{code-block} xml :linenos: :name: code-local_mesh_example :caption: Example input. A material1 0.2 B material2 0.2 ``` **Specification** - `` - Name of the material to be filled. Required. - `` - Name of the point located in the fill region. Optional. - `` - Name of the base line defining part or complete boundary. Optional. - `fillside` - Side of the fill with respect to the base line. Optional. - `` - Rotating angle in degree about the x₁ axis. Optional. Default is 0 degree. - `` - Rotating angle in degree about the y₃ axis. Optional. Default is 0 degree. - `` - Local mesh size. Optional. - `at` - A list of names of points where the local mesh size will be assgined. Required. ## Components dependency If two components are connected in the 'T' type ([](#fig-joints)), then the order of creation of the two components must be specified. This is done by specifying the dependency. For the case shown in the figure, the creation of the thin vertical component (purple) is dependent on the creation of the thick horizontal component (blue). Hence, in the definition of the purple component, a `depend` attribute should be specified as shown below. ```{code-block} xml :linenos: :name: code_depend :caption: Dependency. ... ... ``` If a component is dependent on multiple components, their names shoule all be listed, delimited by comma.