ansys / pyprimemesh

Pythonic Meshing Client for Ansys Prime Server
https://prime.docs.pyansys.com/
MIT License
20 stars 9 forks source link

Bug located in CDB export #669

Closed waltersma closed 6 months ago

waltersma commented 11 months ago

🔍 Before submitting the issue

🐞 Description of the bug

The number of entities observed in the CDB mesh file is incorrect, (APS 937703)

Before writing CDB Printing model

Part Summary:

Part Name: pyprime_block_import Part ID: 2 17 Topo Edges 8 Topo Faces 1 Topo Volumes

0 Edge Zones
    Edge Zone Name(s) : []
0 Face Zones
    Face Zone Name(s) : []
1 Volume Zones
    Volume Zone Name(s) : [solid]    

1 Label(s)
    Names: [my_group]

Bounding box (-16 0 -17)
             (12 28 11)

The CDB file shows after reading to PyPrimeMesh Part Summary: <----Missing Part Name

Part Name: Part ID: 2 0 Edge Zonelets 3 Face Zonelets <----Extra Face Zonelet 2 Cell Zonelets <----Extra CellZonelet

0 Edge Zones
    Edge Zone Name(s) : []
0 Face Zones
    Face Zone Name(s) : []
2 Volume Zones
    Volume Zone Name(s) : [volume, volume.1]   <---- Extra Volume Zone

1 Label(s)
    Names: [my_group]

Bounding box (-16 0 -17)
             (12 28 11)

📝 Steps to reproduce

Run following code:

from ansys.meshing import prime

with prime.launch_prime() as client :
    model = client.model
    mesher = prime.lucid.Mesh(model)
    mesher.read(file_name=prime.examples.download_block_model_fmd())
    mesher.surface_mesh(min_size=2.0)
    mesher.volume_mesh()
    mesher.write("test.cdb")
    print(model)
    mesher.read("test.cdb")
    print(model)

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

24R1

🐍 Which Python version are you using?

3.8

📦 Installed packages

ansys-api-meshing-prime==0.1.2.dev1
-e git+https://github.com/ansys/pyprimemesh.git@b59d14245cce28f11fe3574adeb4e6ebc3946101#egg=ansys_meshing_prime
appdirs==1.4.4
certifi==2023.7.22
charset-normalizer==3.3.2
contourpy==1.2.0
cycler==0.12.1
fonttools==4.44.0
grpcio==1.59.2
idna==3.4
kiwisolver==1.4.5
matplotlib==3.8.1
numpy==1.26.2
packaging==23.2
Pillow==10.1.0
platformdirs==4.0.0
pooch==1.8.0
protobuf==3.20.3
pyparsing==3.1.1
python-dateutil==2.8.2
pyvista==0.42.3
requests==2.31.0
scooby==0.9.2
six==1.16.0
urllib3==2.1.0
vtk==9.3.0
waltersma commented 6 months ago

APS 937703 closed as complete.