-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe3de47
commit 102e648
Showing
5 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
****************************************************************************** | ||
Data | ||
****************************************************************************** | ||
|
||
An analysis with COMPAS FEA2 is defined by a "model" (:class:`compas_fea2.model.Model`) | ||
and a "problem" (:class:`compas_fea2.problem.Problem`), with each many different sub-components. | ||
|
||
All these components, and the model and problem themselves, are COMPAS data objects, | ||
and derive from a base FEA2 data class (:class:`compas_fea2.base.FEAData`). | ||
|
||
.. code-block:: None | ||
compas.data.Data | ||
|_ compas_fea2.base.FEAData | ||
|_ compas_fea2.model.Model | ||
|_ compas_fea2.model.Node | ||
|_ compas_fea2.model.Element | ||
|_ ... | ||
|_ compas_fea2.model.Part | ||
|_ ... | ||
|_ compas_fea2.model.Material | ||
|_ ... | ||
|_ compas_fea2.model.Section | ||
|_ ... | ||
|_ compas_fea2.model.Constraint | ||
|_ ... | ||
|_ compas_fea2.model.Group | ||
|_ ... | ||
|_ compas_fea2.model.BoundaryCondition | ||
|_ ... | ||
|_ compas_fea2.model.InitialCondition | ||
|_ ... | ||
.. code-block:: None | ||
compas.data.Data | ||
|_ compas_fea2.base.FEAData | ||
|_ compas_fea2.problem.Problem | ||
|_ compas_fea2.problem.Step | ||
|_ ... | ||
|_ compas_fea2.problem.Load | ||
|_ ... | ||
|_ compas_fea2.problem.Displacement | ||
|_ ... | ||
This means that all these components have the same base data infrastructure as all other COMPAS objects. | ||
They have a guid, a name, and general attributes. | ||
|
||
>>> from compas_fea2.model import Node | ||
>>> node = Node(name='node') | ||
>>> node.name | ||
'node' | ||
>>> node.guid | ||
... | ||
>>> node.attributes | ||
{} | ||
|
||
The can be converted to data and serialised to a JSON string or file. | ||
|
||
>>> node.to_data() | ||
{'name': 'node', 'guid': ..., 'attributes': {}} | ||
>>> node.to_jsonstring() | ||
'{"name": "node", "guid": ..., "attributes": {}}' | ||
|
||
The only difference from other COMPAS objects is their default name. | ||
|
||
>>> node = Node() | ||
>>> node.name | ||
... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,63 @@ | ||
****************************************************************************** | ||
Model | ||
****************************************************************************** | ||
|
||
At the heart of every COMPAS FEA2 analysis or simluation is a model. | ||
A model consists of nodes, elements and parts, | ||
and defines connections, constraints and boundary conditions. | ||
|
||
>>> from compas_fea2.model import Model | ||
>>> model = Model() | ||
>>> model | ||
|
||
Nodes | ||
===== | ||
|
||
Nodes are the basic building blocks of a model. | ||
They define the locations in space that define all other entities. | ||
|
||
>>> from compas_fea2.model import Node | ||
>>> node = Node(x=0, y=0, z=0) | ||
>>> node | ||
Node(...) | ||
>>> node.x | ||
0.0 | ||
>>> node.y | ||
0.0 | ||
>>> node.z | ||
0.0 | ||
>>> node.xyz | ||
[0.0, 0.0, 0.0] | ||
>>> node.point | ||
Point(0.0, 0.0, 0.0) | ||
|
||
Besides coordinates, nodes have many other (optional) attributes. | ||
|
||
>>> node.mass | ||
[None, None, None] | ||
>>> node.temperature | ||
None | ||
>>> node.dof | ||
{'x': True, 'y': True, 'z': True, 'xx': True, 'yy': True, 'zz': True} | ||
>>> node.loads | ||
{} | ||
>>> node.displacements | ||
{} | ||
|
||
Nodes also have a container for storing calculation results. | ||
|
||
>>> node.results | ||
{} | ||
|
||
|
||
Elements | ||
======== | ||
|
||
Elements are defined by the nodes they connect to and a section. | ||
|
||
|
||
>>> | ||
|
||
|
||
Parts | ||
===== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
****************************************************************************** | ||
Model | ||
****************************************************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
******************************************************************************** | ||
Next Steps | ||
******************************************************************************** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters