{ "id": "single-software-execution--cli--openfoam--task-12--ubuntu", "snapshot": "OpenFOAM11", "instruction": "The incomplete pipe template `/home/user/Desktop/pipe_base/` is provided. The uploaded template is an editable input only; no result or answer artifacts are preloaded. Source `/opt/openfoam11/etc/bashrc` before invoking `run_parallel.py`.\n\nFrom the command line, complete a deterministic four-process parallel pipe-flow calculation. 1. Write `/home/user/Desktop/build_case.py` and create `/home/user/Desktop/pipe_parallel/` as a 5-degree axisymmetric wedge of a circular pipe with length `3 m`, radius `0.05 m`, and mesh `240 x 20 x 1`, for exactly 4,800 hexahedral cells. Use patches `inlet`, `outlet`, `wall`, `axis`, `wedgeLow`, and `wedgeHigh`. Set a uniform inlet velocity `(1 0 0) m/s`, zero-gradient outlet velocity, outlet kinematic pressure `p=0`, and no-slip wall. Use constant-density laminar flow with `rho=1 kg/m^3` and `nu=1e-4 m^2/s`, giving `Re_D=U*D/nu=1000`. 2. Configure `simpleFoam` for exactly 1000 iterations, ASCII output at iteration 1000, linear-upwind velocity convection, GAMG pressure solution, and corrected laplacians. Configure `decomposeParDict` for exactly four subdomains with `method simple` and `n=(4 1 1)`. 3. Write `/home/user/Desktop/run_parallel.py` to run, in order, `blockMesh`, `checkMesh`, `decomposePar -force`, `mpirun --oversubscribe -np 4 simpleFoam -parallel`, `reconstructPar -latestTime`, and `postProcess -latestTime -func writeCellCentres`. Retain `pipe_parallel/log.blockMesh`, `log.checkMesh`, `log.decomposePar`, `log.simpleFoam.parallel`, `log.reconstructPar`, and `log.cellCentres`. Every log must finish with `End`, `checkMesh` must report `Mesh OK.`, the parallel log must report four processes, all four `processor0` through `processor3` directories must retain their addressing and iteration-1000 fields, and the reconstructed case must contain nonuniform `U`, `p`, and `C` fields for all 4,800 cells. 4. Write `/home/user/Desktop/postprocess.py`. From the 20 outlet-adjacent radial cells, integrate `rho*Ux` over exact axisymmetric annulus areas to obtain the outlet mass flow. Save `/home/user/Desktop/outlet_mass_flow.csv` with columns `radius_m,ux_m_s,poiseuille_ux_m_s,annulus_area_m2,mass_flow_kg_s`. Verify the integrated flow is within 2 percent of `rho*U_bulk*pi*R^2` and the area-weighted RMS velocity-profile error relative to `Ux=2*U_bulk*(1-(r/R)^2)` is below `0.08 m/s`. 5. Save `/home/user/Desktop/summary.txt` as exactly the reconstructed outlet mass flow in `kg/s`. Do not use ParaView or other GUI tools.", "source": "https://github.com/openfoam/openfoam-dev", "config": [ { "type": "upload_file", "parameters": { "files": [ { "local_path": "task-12/init_file/pipe_base.tar", "path": "/home/user/Desktop/pipe_base.tar" } ] } }, { "type": "launch", "parameters": { "command": "bash -c \"mkdir -p '/home/user/Desktop/' && tar -xf '/home/user/Desktop/pipe_base.tar' -C '/home/user/Desktop/' && rm -f '/home/user/Desktop/pipe_base.tar'\"", "shell": true } } ], "trajectory": "trajectories/", "related_apps": [ "openfoam" ], "artifact_paths": [ "/home/user/Desktop/build_case.py", "/home/user/Desktop/outlet_mass_flow.csv", "/home/user/Desktop/pipe_parallel", "/home/user/Desktop/postprocess.py", "/home/user/Desktop/run_parallel.py", "/home/user/Desktop/summary.txt" ], "evaluator": { "postconfig": [ { "type": "upload_file", "parameters": { "files": [ { "local_path": "task-12/eval.py", "path": "/home/user/Desktop/eval.py" } ] } } ], "func": "exact_match", "result": { "type": "vm_command_line", "command": "python3 /home/user/Desktop/eval.py", "shell": "true" }, "expected": { "type": "rule", "rules": { "expected": "True\n" } } }, "proxy": false, "fixed_ip": false, "possibility_of_env_change": "low" }