CFD Automate Sample Function

Hi Speckle Community!

I have been looking through Speckle Automate functions. The QA/QC workshop material has been super helpful.

I was trying to use the CFD function, however it produces this error. It seems that get_cfd_export_path() in archaea is expecting an input called ‘case_name’. Would appreciate if anyone could give some guidance on how to use this function.

fyi I also tried to recreate the function and just input an id as case_name but when I tried to publish the function there seems to be a system dependency that I could not get. (I might have packaged it the wrong way)

Anyways, very impressed by the functionality of Automate! Very empowering to be able to create on top of the platform and share code as well :slight_smile:
Thanks in advance!


image

“”“[prepare] 2025/02/11 05:58:31 Entrypoint initialization[5781f16e5f-cc42bfb3e1-24d846] Reporting run status with content: {‘projectId’: ‘d4fc7342e3’, ‘functionRunId’: ‘57999452285bcd7’, ‘status’: ‘RUNNING’, ‘statusMessage’: None, ‘results’: None, ‘contextView’: None}[5781f16e5f-cc42bfb3e1-24d846] number of cpus 16[5781f16e5f-cc42bfb3e1-24d846] It took 2.22 seconds to receive the speckle version 6255269130[5781f16e5f-cc42bfb3e1-24d846] Traceback (most recent call last):[5781f16e5f-cc42bfb3e1-24d846] File “/home/openfoamRunner/.local/lib/python3.10/site-packages/speckle_automate/runner.py”, line 169, in run_function[5781f16e5f-cc42bfb3e1-24d846] automate_function(automation_context, inputs) # type: ignore[5781f16e5f-cc42bfb3e1-24d846] File “//main.py”, line 126, in automate_function[5781f16e5f-cc42bfb3e1-24d846] archaea_folder = get_cfd_export_path()[5781f16e5f-cc42bfb3e1-24d846] TypeError: get_cfd_export_path() missing 1 required positional argument: ‘case_name’[5781f16e5f-cc42bfb3e1-24d846] [5781f16e5f-cc42bfb3e1-24d846] Automation run EXCEPTION after 2.33 seconds.[5781f16e5f-cc42bfb3e1-24d846] Function error. Check the automation run logs for details.[5781f16e5f-cc42bfb3e1-24d846] Reporting run status with content: {‘projectId’: ‘d4fc7342e3’, ‘functionRunId’: ‘57999452285bcd7’, ‘status’: ‘EXCEPTION’, ‘statusMessage’: ‘Function error. Check the automation run logs for details.’, ‘results’: None, ‘contextView’: ‘/projects/d4fc7342e3/models/3e168d8527@6255269130’}”“”

ive looked into this for you, but only gotten a little progress.

the base library archaea_simulation changed its method names in an update that the install step installs but the method signature in the automate function obviously doesn’t.

the method name should be create_cfd_case instead of create_case according to the archaea_simulation package so far so good

but i couldnt get the thing to run and test locally and struggled to get any decent Dockerfile setup to install everything … over to @oguzhan

1 Like

thanks for looking into this! :slight_smile:

Hi @NaoB,

Seems like there is a version mismatch with the function, archaea-simulation version shouldn’t have bumped from 1.2.2 to 1.3.0. I am going to sort it out, and get back to you!

Best

1 Like

thank you, appreciate it!