Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/geometry-mechanical-dpf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,23 +276,31 @@ jobs:

- name: Set numeric ANSYS version
run: echo "ANSYS_VERSION=${{ matrix.ansys-release }}" | tr -d '.' >> $GITHUB_ENV

- name: "Install DPF"
id: set-server-path
uses: ansys/pydpf-actions/install-dpf-server@v2.3
with:
dpf-standalone-TOKEN: ${{secrets.PYANSYS_CI_BOT_TOKEN}}
ANSYS_VERSION: ${{ env.ANSYS_VERSION }}

- name: "Test DPF"
id: test_dpf
run: |
strace -f -e trace=file dpf-standalone/v241/ansys/dpf/server_2024_1_pre1/aisol/bin/linx64/Ans.Dpf.Grpc.sh

- name: "Check licences of packages"
uses: ansys/pydpf-actions/check-licenses@v2.3

- name: Run the PyDPF script
run: |
python geometry-mechanical-dpf/wf_gmd_03_dpf.py

- name: Store the outputs
if: always()
uses: actions/upload-artifact@v4
with:
name: geometry-mechanical-dpf-workflow-mechanical-dpf-outputs-${{ matrix.ansys-release }}
name: dpf-outputs-${{ matrix.ansys-release }}
path: geometry-mechanical-dpf/outputs

- name: (DOCS) Download the docs artifacts
Expand Down
22 changes: 17 additions & 5 deletions geometry-mechanical-dpf/wf_gmd_03_dpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,20 @@ def find_files(directory, extension):

steady_state_rth_file = find_files(
os.path.join(project_directory, "SteadyStateThermal"), extension_to_find
)
)[0]
transient_rth_file = find_files(
os.path.join(project_directory, "TransientThermal"), extension_to_find
)
)[0]

if steady_state_rth_file and transient_rth_file:
print(f"Found {extension_to_find} files.")
else:
print("No .rst files found.")

print(steady_state_rth_file)
print(Path(str(steady_state_rth_file)).exists())
print(transient_rth_file)
print(Path(str(transient_rth_file)).exists())


###############################################################################
Expand All @@ -98,12 +100,22 @@ def find_files(directory, extension):
# Result precision
decimal_precision = 6

###############################################################################
# Add DPF Debug commands
DEBUG_DIR = OUTPUT_DIR / "dpf_debug"
os.environ["DATAPROCESSING_DEBUG"] = str(DEBUG_DIR)
server = dpf.start_local_server()
print(server)
print(dpf.Operator("mapdl::stream_provider"))


###############################################################################
# Steady state thermal results
# ----------------------------
# Create model

steady_state_model = dpf.Model(steady_state_rth_file[0])
ds = dpf.DataSources()
ds.set_result_file_path(filepath=steady_state_rth_file, key="rth")
steady_state_model = dpf.Model(data_sources=ds)
print(steady_state_model)

# Get temperature distribution
Expand All @@ -119,7 +131,7 @@ def find_files(directory, extension):
# -------------------------
# Create model

model = dpf.Model(transient_rth_file[0])
model = dpf.Model(transient_rth_file)
print(steady_state_model)

# Get temperature distribution
Expand Down
Loading