StructElmer (class)

Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Simulation/StructElmer

class StructElmer(Kmesh_fineness=1, path_name='', FEA_dict_enforced=-1, is_get_mesh=False, is_save_FEA=True, transform_list=-1, include_magnets=True, logger_name='Pyleecan.Structural', init_dict=None, init_str=None)[source]

Bases: pyleecan.Classes.Structural.Structural

Structural module: FEA model with Elmer

VERSION = 1
run()

Run the Structural module

get_meshsolution(output)

Get and set the mesh data and solution data.

Parameters
  • self (StructElmer) – a StructElmer object

  • save_path (str) – Full path to folder in which the results are saved

Returns

success – Information if meshsolution could be created

Return type

bool

get_path_save_fea(output)

Return the path to save the FEA simulation

Parameters
  • self (MagFEMM) – a MagFEMM object

  • output (Output) –

    an Output object

    Returns

  • -------

  • save_path (str) – Path to save the .fem file

solve_FEA(output)

Solve the FEA simulation

gen_mesh(output)

Initialize the FEA simulation model

Parameters
  • self (StructElmer object) –

  • output (Output) – Output object that contains the StructElmer simulation

gen_case(output, mesh_names)

Setup the Elmer Case file (.sif file)

process_mesh(file_in, file_out, is_get_lam=True, is_get_magnet=False, is_hole_air=True)

Preprocess the GMSH model, i.e. remove unused parts, rename boundaries, …

save(save_path='', is_folder=False)

Save the object to the save_path

Parameters
  • self – A pyleecan object

  • save_path (str) – path to the folder to save the object

  • is_folder (bool) – to split the object in different files: separate simulation machine and materials

copy(**kwargs)

Return a copy of the class

get_logger()

Get the object logger or its parent’s one

Parameters

obj – A pyleecan object

Returns

logger – Pyleecan object dedicated logger

Return type

logging.Logger

compare(other, name='self')[source]

Compare two objects and return list of differences

as_dict(**kwargs)[source]

Convert this object in a json serializable dict (can be use in __init__). Optional keyword input parameter is for internal use only and may prevent json serializability.

property Kmesh_fineness

finner , < 1 : less fine)

Type

float

Type

global coefficient to adjust mesh fineness in FEMM (1

Type

default , > 1

property path_name

Name of the path to save the FEA model

Type

str

property FEA_dict_enforced

To enforce user-defined values for FEA main parameters

Type

dict

property is_get_mesh

To save FEA mesh for latter post-procesing (only possible with is_save_FEA set to True)

Type

bool

property is_save_FEA

To save FEA mesh and solution in .vtu file

Type

bool

property transform_list

label (to select the surface), type (rotate or translate), value (alpha or delta)

Type

list

Type

List of dictionnary to apply transformation on the machine surfaces. Key

property include_magnets

Switch to include magents in the structural simulation

Type

bool