Model

class compas_fea2.model.Model(*args, **kwargs)[source]

Class representing an FEA model.

Parameters:
  • name (str, optional) – Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file.

  • description (str, optional) – Some description of the model, by default None. This will be added to the input file and can be useful for future reference.

  • author (str, optional) – The name of the author of the model, by default None. This will be added to the input file and can be useful for future reference.

Attributes:
  • name (str) – Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file.

  • description (str) – Some description of the model. This will be added to the input file and can be useful for future reference.

  • author (str) – The name of the author of the model. This will be added to the input file and can be useful for future reference.

  • parts (Set[compas_fea2.model.DeformablePart]) – The parts of the model.

  • bcs (dict) – Dictionary with the boundary conditions of the model and the nodes where these are applied.

  • ics (dict) – The initial conditions of the model.

  • constraints (Set[compas_fea2.model._Constraint]) – The constraints of the model.

  • partgroups (Set[compas_fea2.model.PartsGroup]) – The part groups of the model.

  • facesgroups (Set[compas_fea2.model.FacesGroup]) – The surfaces of the model.

Methods

add_bcs

Add a compas_fea2.model._BoundaryCondition to the model.

add_clampXX_bc

Add a fixed boundary condition type free about XX to some nodes in a part.

add_clampYY_bc

Add a fixed boundary condition free about YY type to some nodes in a part.

add_clampZZ_bc

Add a fixed boundary condition free about ZZ type to some nodes in a part.

add_elements_ics

Add a compas_fea2.model._InitialCondition to the model.

add_fix_bc

Add a compas_fea2.model.FixedBC to the nodes in a part.

add_nodes_ics

Add a compas_fea2.model._InitialCondition to the model.

add_part

Adds a DeformablePart to the Model.

add_parts

Add multiple parts to the model.

add_parts_group

Add a PartsGroup object to the Model.

add_parts_groups

Add a multiple PartsGroup object to the Model.

add_pin_bc

Add a pinned boundary condition type to some nodes in a part.

add_problem

Add a compas_fea2.problem.Problem object to the model.

add_problems

Add multiple compas_fea2.problem.Problem objects to the model.

add_rollerXY_bc

Add a roller free on XY boundary condition type to some nodes in a part.

add_rollerXZ_bc

Add a roller free on XZ boundary condition type to some nodes in a part.

add_rollerX_bc

Add a roller free on X boundary condition type to some nodes in a part.

add_rollerYZ_bc

Add a roller free on YZ boundary condition type to some nodes in a part.

add_rollerY_bc

Add a roller free on Y boundary condition type to some nodes in a part.

add_rollerZ_bc

Add a roller free on Z boundary condition type to some nodes in a part.

analyse

analyse_and_extract

analyse_and_store

analyze

check

Check for possible problems in the model

contains_node

contains_part

Verify that the model contains a specific part.

find_closest_nodes_to_node

find_closest_nodes_to_point

find_element_by_key

find_elements_by_name

find_node_by_key

find_nodes_around_node

find_nodes_by_attribute

find_nodes_by_location

find_nodes_by_name

find_nodes_in_polygon

find_nodes_on_plane

find_nodes_where

find_part_by_name

Find if there is a part with a given name in the model.

find_problem_by_name

Find a problem in the model using its name.

from_cfm

Imports a Problem object from an .cfm file through Pickle.

get_displacement_at_nodes_sql

get_displacements_sql

get_max_displacement_sql

get_min_displacement_sql

get_reaction_forces_sql

get_reaction_moments_sql

group_parts_where

Group a set of parts with a give value of a given attribute.

remove_all_bcs

Removes all the boundary conditions from the Model.

remove_bcs

Release a node previously restrained.

restart_analysis

show

WIP

store_results_in_model

summary

Prints a summary of the Model object.

to_cfm

Exports the Model object to an .cfm file through Pickle.

to_json

Serialize the data representation of an object to a JSON file.

write_input_file

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

data

from_data

Construct an object of this type from the provided data.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

from_name

Create an instance of a class of the registered plugin from its name.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_data

Convert an object to its native data representation.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.