Architecture ============ .. image:: NCC-TEC-4376.* :width: 1000 On the figure above, arrows point from an object 1 to object 2, where object 1 inherits from object 2. The figure is also work-in-progress. The outline titled "mostly fixed" houses the objects that have been implemented and used. These will hopefully see only minor adjustments. Objects outside this area might end up being standardised differently than currently suggested. All fields are optional unless otherwise specified, or unless required to construct specific object. Where the same attribute is being called in parent and child (e.g. axis being referenced in ply, and in some of corresponding cut pieces), the more detailed (child) component supersedes the corresponding parent definition. CompositeDB object is the main object of the Composite Standard. All objects are stored in lists named all***. Object definitions ------------------ .. py:function:: CompositeStandard.CompositeDB(BaseModel) All elements and all geometry are all stored here and used elsewhere as refrence Points are stored withing those, as referencing is not efficient BaseModel input signifies the default generation with Pydantic library, without any local parent. :param name: str - name :param allComposite: list - List of CompositeElement type objects :param allEvents: list - List of "events" objects - all = exhaustive list :param allGeometry: list - List of "GeometricElement" objects - all = exhaustive list :param allStages: list - List of "Stages", all stages where CompoST file is edited (manufacturing, NDT, simulation...) :param allMaterials: list - List of "Material" objects - all = exhaustive list :param allDefects: list - List of "Defect" objects - should contain all, that are referenced elsewhere :param allTolerance: list - List of "Tolerance" objects :param fileMetadata: 'FileMetadata' - metadata for this CompoST file :param allSimulations: list - List of "SimulationData" objects :param allManufMethods: list - List of "ManufMethod" objects .. py:function:: CompositeStandard.FileMetadata(BaseModel) Metadata related to this particular part. :param lastModified: date :param lastModifiedBy: str - latest changes to the file have been done by :param author: str - initial part definition created by :param version: str - version of the CompoST used to work with this file :param layupDefinitionVersion: str - initial part layup definition generated by :param cadFile: str - related CAD file, if references to geometries are required, .step format is recommended. Should be stored in same folder. :param toolCadFilePath: str - only used if tool has separate CAD file from the above :param maxID: int - maxium ID used for any object int the file, used for preventing duplicaiton of IDs :param cadFilepath: str - should only be used when CAD could not be stored in same folder as this file :param Requirements: dict - bespoke dictionary of requirements that user wants stored for later use or reference. It might be useful to create template for this for type of product e.g. Pressure Vessel. However, this standardisation is beyoned the scope of CompoST. .. py:function:: CompositeStandard.CompositeDBItem(BaseModel) :param memberName: str - name :param additionalParameters: dict - to hold use-case specific values (to be further defined). This should never hold copies of IDed objects, as these cannot be re-linked on deserialization. If reference to objects elsewhere in CompoST are required, ID reference should be used, not full object. :param stageIDs: int - reference to Stage object :param deactivate_stageID: int - this object is not relevant after this stage, either it has been superceeded or it's purpose was fullfilled :param active: boolean - on default "True", can be turned "False" to indicate this is no longer representative of up-to-date part :param ID: int - used for references between objects .. py:function:: CompositeStandard.SimulationData(CompositeDBItem) This is abstract class, parent for various types of simulations. :param axisSystem: 'AxisSystem' - reference to axis system :param sourceSystem: `SourceSystem` - the software or tool used for analysis :param cadFile: str - path and name to CAD file :param toolCadFile: str - path and name to CAD file for tool (if different) .. py:function:: CompositeStandard.GeometricElement(CompositeDBItem) :param source: str - the software, script, or database that this object originated from :param refFile: str - reference full name of dedicated file housing this geometry (assume same directory) .. py:function:: CompositeStandard.CompositeElement(CompositeDBItem) This includes any object that is used to describe composite component specifically. :param subComponent: list - :py:meth:`~CompositeStandard.CompositeDBItem.get` , either as object or ID :param requirements: list - list of objects of Requirement type, to be further specified :param defects: list - list of "defects" type objects :param tolerances: list - list of "tolerance type objects :param axisSystem: 'AxisSystem' - refernce axis system object in allGeometry :param referencedBy: list - optional list of objects that currently reference this object :param manufMethod: `ManufMethod` - manufacturing method object .. py:function:: CompositeStandard.Point(GeometricElement) :param x: float :param y: float :param z: float .. py:function:: CompositeStandard.Line(GeometricElement) :param points: list - list of two points , no more - no less :param length: float - can be calculated from above, but can be stored to prevent calculation duplication .. py:function:: CompositeStandard.AxisSystem(GeometricElement) The three vectors listed bewow must be perpendicular to each other. :param o_pt: `CompositeStandard.Point` - origin location of axis system expressed in global axis system :param x_pt: `CompositeStandard.Point` - point, (x_pt-o_pt) denoting x-vector of new axis system :param y_pt: `CompositeStandard.Point` - point, (y_pt-o_pt) denoting y-vector of new axis system :param z_pt: `CompositeStandard.Point` - point, (z_pt-o_pt) denoting z-vector of new axis system (this one is auto-calculated) There were 3 main core requirements for definition of Axis System. It should be possible to write out reasonably simple axis system by user, without any calculations. Minimum number of values should be used for initial full definition of the axis system (8). The perpendicularity of the 3 axis should be enforeced without user participation. The class definition automatically calculates z_pt, when this object is initialized or altered. If y_pt made axis is not perpendicular to x_pt made axis, y_pt is recalculated using z_pt. User is encouraged to specify first 2 axis perpendicular to each other. However, if user fails to do so the object adjusts itself (at least when using the standard CompoST library in Python). User cannot set z_pt on it's own. Upon any changes this is recalculated from x_pt, y_pt and o_pt. .. py:function:: CompositeStandard.Material(CompositeDBItem) Abstract class housing different types of materials. For generic material, where these properties are used use `GenericMaterial` that uses this class as a parent. User of the format is responsible for using consistent units. CompoST does not enforce units used. :param E1: float - young's modulus in primary direction :param E2: float - young's modulus in secondary direction (in-plane) :param G23: float - shear modulus :param G12: float - interlaminar shear modulus :param v12: float - poisson ratio in plane :param infoSource: str - reference to source of the information :param density: float .. py:function:: CompositeStandard.GenericMaterial(Material) Default material class, if no pre-defined material class fits better. :param K1: float - permeability in primary direction :param K2: float - permeability in secondary direction (in-plane) :param K3: float - permeability out of plane / through thickness :param thickness: float - out of plane thickness :param Vf: float - volume fraction .. py:function:: CompositeStandard.EffectiveProperties(CompositeDBItem) Effective material properties. Usually calculated properties for laminate, but also may be used for defect knockdown properties etc. :param K1: float - permeability in primary direction :param K2: float - permeability in secondary direction (in-plane) :param K3: float - permeability out of plane / through thickness :param thickness: float - out of plane thickness :param Vf: float - volume fraction .. py:function:: CompositeStandard.Piece(CompositeElement) In practical terms this is section of ply layed-up in one (particulartly relevant for AFP or similar) :param splineRelimitaion: 'Spline' - points collected as spline for relimitation :param material: 'Material' - reference 'Material' object .. py:function:: CompositeStandard.Ply(CompositeElement) :param splineRelimitaion: 'Spline' - points collected as spline for relimitation :param material: 'Material' - reference 'Material' object :param orientation: float - direction of lay-up with reference to x-axis of placementRosette .. py:function:: CompositeStandard.Sequence(CompositeElement) Can either be defined complely by inherited properties (ply list in subComponents). Or can be defined by list of orientations and materials, if no additional information is required. For single-material laminate leave "materials" empty, and fill in "singleMaterial" The subComponents in sequence must be ordered tool placement (first object is initial ply placed on the tool) :param orientations: list - list of floats, orientations listed with reference to placementRosette :param materials: list - list of 'Material' objects :param material: 'Material' - reference 'Material' object :param splineRelimitaion: 'Spline' - points collected as spline for relimitation :param EP: 'EffectiveProperties' - effective properties for the entire sequence .. py:function:: EngEdgeOfPart(CompositeElement) Stands for engineering edge of part. :param splineRelimitaion: 'Spline' - points collected as spline for relimitation :param source: 'SourceSystem' - CAD system where this was defined :param referenceGeometry: str - the name of edge of part defining geometry, as used inside CAD system .. py:function:: CompositeStandard.CompositeComponent(CompositeElement) :param integratedComponents: list - allows for integrating othre complete CompoST databases as sub-components :param ED: 'EffectivePropertie' - Effective properties are only specified when applicable for the complete 'CompositeComponent', if different from 'material' :param material: 'Material' - reference 'Material' object .. py:function:: CompositeStandard.SourceSystem(BaseModel) :param softwareName: str :param version: str - version used to generate objects referencing this :param link: str - link to GitHub, docs... where appropriate .. py:function:: CompositeStandard.MeshElement(GeometricElement) :param nodes: list - `Point` objects .. py:function:: CompositeStandard.Spline(GeometricElement) :param splineType: int - types of splines based on OCC line types (ref to be provided) :param pointRefs: list - list of IDs (only use this variable if 'points' variable unused :param points: `Point` - This variable prevents complex ID referencing for points that belong to this spline only :param length: float - calculated lenght of spline :param breaks: list - list of integers referencing points which break spline into multiple for visual representation (e.g. sharp corners), this refers to points if available, or pointRefs. .. py:function:: CompositeStandard.Defect(CompositeDBItem) Storing a defect belonging to this class only stores the data regarding the feature. Weather or not this classifies as a defect in enginering process, depends on comparing the data stored here with the appropriate :func:`CompositeStandard.Tolerance` :param status: bool - None = not evaluated, True = defect outside of tolerance, False = deviation but fits within tolerance :param location: float - x,y,z location :param effMaterial: `EffectiveProperties` - adjusted material class saved :param axisSystem: 'AxisSystem' - reference to `AxisSystem` object :param file: str - reference to file which houses defect - not needed if relimitation defined directly in CompoST :param splineRelimitation: `Spline` - object defining the area in question. If neither of spline definitions is used, it should be assumed the defect applies to full part as provided in CAD. .. py:function:: CompositeStandard.Wrinkle(Defect) :param area: float - can be calculated in various more precise ways, but in general this can be approximated by size_x*size_y :param aspectRatio: float - typically size_x/size_y :param maxRoC: float - machimum "rate of changes" (RoC), or slope, is the angle of deviation towards the apex, in simplest case of wrinkle in x direction it can be approximated by: [ RoC = arctan(maxAmplitude/(0.5*maxX)) ]. In Radians. :param size_x: float - maximum size of the deviation in x direction of the relavant axis system :param size_y: float - maximum size of the deviation in y direction of the relavant axis system :param meshRef: int - mesh corresponding to defect area or volume :param amplitude: float - the size of the defect in out-of plane direction .. py:function:: CompositeStandard.SolidComponent(CompositeElement) CAD shapes, for instace useful when using a 3D core/insert :param cadFile: str - file path to the part, or reference to PLM site :param sourceSystem: `SourceSystem` - .. py:function:: CompositeStandard.Tolerance(CompositeDBItem) :param splineRelimitation: `Spline` - object defining the area in question .. py:function:: CompositeStandard.WrinkleTolerance(Tolerance) :param maxX: float - maximum size of the deviation in x direction of the relavant axis system :param maxY: float - maximum size of the deviation in y direction of the relavant axis system :param axisSystem: 'AxisSystem' - axis system reference :param maxArea: float - can be calculated in various more precise ways, but in general this can be approximated by maxX*maxY :param maxRoC: float - Rate of change (RoC), or slope, is the angle of deviation towards the apex, in simplest case of wrinkle in x direction it can be approximated by: [ RoC = arctan(maxAmplitude/(0.5*maxX)) ]. In Radians. :param maxSkew: float - [definition to be croudsourced later] :param maxAmplitude: float - maximum out of plane deviation .. py:function:: CompositeStandard.FibreOrientations(Defect) :param lines: list - list of `Line` objects, as scanned and translated into points and vectors :param orientations: list - list of floats that should be the same size as ``lines``. This could also be calculated from ``lines`` and ``axisSystem``. :param avDeviation: float - average of local differences between orientation and defined ply orientation. This is more indicative than 'averageOrientation' as that one can offer falsely optimistic results. :param averageOrientation: float - average of the above. This average does not take into account lenght of the lines, but simply averages all data points as if they were equal. .. py:function:: CompositeStandard.Tape(Material) :param thickness: float - out of plane size :param width: float - width of tape :param Xt: float - Tensile strenght in principle direction :param Yt: float - Tensile strenght in transverse direction :param Xc: float - Compressive strenght in principle direction :param Yc: float - Compressive strenght in transverse direction :param density_fibre: float - density of the fibres :param density_resin: float - density of the resin :param Vf: float - volume fraction :param tow_count: int - number of tows in tape :param density_linear: float - typically g/m density of individual fibre The objects below are temporary definitions, that might still be subject to changes. Included for testing purposes. .. py:function:: CompositeStandard.FibreOrientationTolerance(Tolerance) :param max_avDeviation:: float - average difference to intended ply orientation based off all sampling points within relimitation .. py:function:: CompositeStandard.DrapingSimulation(SimulationData) :param initialDrapePoint: point - location of first intended contact between ply and tool :param plyID: int - ply ID, one DrapingSimulation object for each ply - if z=0 it likely needs a projection to surface in z vector :param newOrientation: float - Prescribed orientation of ply at the initial draping location :param maxShearAngle: float - maximum predicted shear angle in the full ply :param acceptedDarts: list of `Line` objects - list of lines indicating accepted locations for darts :param drapeDirections: list of `Spline` objects - list of splines indicating draping directions, only one spline is to be provided in the list if only initial draping direction matters :param drapeMesh: `AreaMesh` - this mesh object corresponds to drapped ply, and is used for mapping shear angles :param mappedShearAngles: list of floats - list of shear angles ordered according to elements in drapeMesh .. py:function:: CompositeStandard.Stage(BaseModel) `Stage` can be used as standalone object that is related to an actual process (NDT/Manufacturing/Analysis...). More details about the intended purpose of stages are available in :ref:`stages-reference`. :param stageID: int - unique stage identifier :param memberName: str :param source: `SourceSystem` :param processRef: str - This is used to reference a file which describes process in question. CompoST is part focused, so processes are only referened here, rather than process details being stored. :param stageParameters: dict - This dictionary allows for bespoke definitions of extra stage parameters, by the user. .. py:function:: CompositeStandard.Zone(CompositeDBItem) There are many potentially uses of Zones, but for now author refrains from fully defining this, until Zones figure in multiple use-cases. :param splineRelimitation: `Spline` - object defining the area in question :param splineRelimitationRef: int - same as above but refenced as ``ID`` only. .. py:function:: CompositeStandard.Delamination(Defect) Delamination occurs between two layers/plies, the convention is to append it to the one that is in the tool direction. :param size_x: float - length in x axis direction :param size_y: float - length in y axis direction :param area: float .. py:function:: CompositeStandar.UnclassifiedDefect(Defect) This class is to be used when the defect you are storing about does not have dedicated class :param title: str - this is to be used to assgin classification to the defect .. py:function:: CompositeStandard.DelaminationTolerance(Tolerance) :param maxX: float - maximum length in x axis direction :param maxY: float - maximum length in y axis direction :param maxArea: flaot - maximume allowed area per defect .. py:function:: CompositeStandard.BoundaryDeviation(Defect) This defect is generated by comparing initial definition of boundary (of layer/sequence/piece/...) to boundary measured in later "Stage". :param maxDeviation: float - maximum distance of a measured point from intended boundary :param avDeviation: float - average deviation along the boundary .. py:function:: CompositeStandard.BoundaryTolerance(Tolerance) :param maxAllowedDev: float - maximum allowed distance of a measured point from intended boundary :param maxAv: float - maximum allowed average deviation along the entire boundary .. py:function:: CompositeStandard.ManufMethod(CompositeDBItem) :param axisSystem: 'AxisSystem' - axis system reference .. py:function:: CompositeStandard.FilamentWinding(ManufMethod) :param windingPath: 'Spline' - Spline defined path of material, as wound on the mandrel :param meridian: 'Spline' - 2D cross section of PV (assumes axisymmetry) - if this shape is revolved it should produce the PV shape. :param steppedMandrel: 'Spline' - for first ply this is equivalent to meridian, then stepped mandrel defines the outermost shape including built-up material :param xMin: float - relevant for hoop layers, defines start point for winding (minimum x-direction limit) :param xMax: float - relevant for hoop layers, defines start point for winding (maximum x-direction limit) :param layerType: str - hoop/helical-geodesic/helical-nongeodesic TODO make this into prescribed keywords and force selection of those only :cylinderPlyThickness: float - Ply thickness in the cylinder area .. py:function:: CompositeStandard.BulkRequest(CompositeElement) This class is used when certain thickness of certain orientation is required, but it has not yet been turned into individual layers. When this object is active, it remains to be split into manufacturable layers. It should be deactivated when individual layers have been defined. :param thickness: float - intended thickness in this orientation :param orientation: float - orientation :param splineRelimitation: 'Spline' - this is specified only if the delmitation is already known for all the resulting layers