execute_workflow¶
The main automation function that utilized a WorkflowConfig to run a sequence of phases based on its parameters.
Run a complete, cached HFSS experiment workflow.
The engine performs four deterministic phases:
- Prepare – create an isolated results folder and, if requested,
copy the template
.aedt
project into it. - Build – apply the current sweep parameters to the HFSS design through the configured builder object.
- Simulate – execute one or more analyses for every parameter set and store their JSON results.
- Aggregate – flatten and merge selected results into CSV files for downstream analysis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
WorkflowConfig
|
Parsed workflow definition.
See the full field reference in
|
required |
Returns:
Type | Description |
---|---|
None
|
None |
Raises:
Type | Description |
---|---|
ValueError
|
If the configuration is incomplete. |
RuntimeError
|
If an HFSS session cannot be opened or a simulation fails unexpectedly. |
Example
from pathlib import Path
from quansys.workflow import (
WorkflowConfig, PyaedtFileParameters,
DesignVariableBuilder, execute_workflow
)
from quansys.simulation import EigenmodeAnalysis
from pycaddy.sweeper import DictSweep
cfg = WorkflowConfig(
pyaedt_file_parameters=PyaedtFileParameters(
file_path=Path("resources/simple_design.aedt"),
non_graphical=True
),
builder=DesignVariableBuilder(design_name="my_design"),
builder_sweep=[DictSweep(parameters={"chip_base_width": ["3 mm", "4 mm"]})],
simulations={
"classical": EigenmodeAnalysis(setup_name="Setup1",
design_name="my_design")
},
aggregation_dict={"classical_agg": ["classical"]}
)
execute_workflow(cfg)
# → results/aggregations/classical_agg.csv is produced