Apply heat flux to largest surface in volume

Hi there

I am trying to use python journal files to load up a step file, find the face with the largest area in the volume and apply a heat load to the nodes on this face

The part I am most stuck on is accessing the properties of the volume such as number of faces and area of each face from the python script. Then finding nodes on the large face is also tricky for me.

Any tips would be much appreciated

Thanks

Jon

You can use the parse_cubit_list and get_volume_or_area functions

parse_cubit_list (const str &type, str int_list, bool include_sheet_bodies=false)
Parse a Cubit style entity list into a list of integers.

For example, to get a list of all the faces:
cubit.parse_cubit_list(“face”, “all”)

get_meshed_volume_or_area (str geom_type, [int] entity_ids)
Get the total volume/area of a entity’s mesh.

For example, to get the area of face 1:
a=[1]
cubit.get_meshed_volume_or_area(“face”, a)

Thanks for the help.

I have made a quick python file to check out the commands

The commands area appears find the area of faces in each mesh elements?

Is it possible to get the area of the surfaces of the geometry in the step file?

I am keen to identify the mesh nodes that are located on a particular face of volume number 2 in the geometry

Sorry for not being clear the first time

thanks,

Jon
find_nodes_of_largest_face.py (1.04 KB)

I see. Here are the functions for the surfaces:

In the parse_cubit_list function, change face to surface:
list_of_surfaces = cubit.parse_cubit_list(“surface”, “all”)

The surface area function is:
get_surface_area (int surface_id)

For example, the area of Surface 1 is:
area = cubit.get_surface_area(1)

Thanks very much your help fixed my problems