File size: 4,117 Bytes
5154c4e
3de3b50
5154c4e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
  "id": "single-software-execution--cli--openfoam--task-06--ubuntu",
  "snapshot": "OpenFOAM11",
  "instruction": "Start from the incomplete OpenFOAM template `/home/user/Desktop/plate_base/`. The uploaded template is an editable input only; no result or answer artifacts are preloaded. Source `/opt/openfoam11/etc/bashrc` before running OpenFOAM commands.\n\nFrom the command line, build and solve a deterministic laminar flat-plate boundary layer. 1. Write `/home/user/Desktop/build_case.py` and create `/home/user/Desktop/plate/`. Use a two-dimensional domain `-0.2<=x<=1.0 m`, `0<=y<=0.2 m`, and one 0.01 m spanwise cell with `frontAndBack` empty. The zero-thickness no-slip plate is the bottom boundary from `x=0` to `x=1.0 m`; use a symmetry-plane bottom boundary upstream of the leading edge. Split the mesh into conformal `40 x 60 x 1` upstream and `200 x 60 x 1` downstream blocks (14,400 cells total), with y-direction simple grading 50 so cells are clustered at the plate. 2. Set `U_infinity=(10 0 0) m/s` at the inlet and top free-stream boundary, outlet kinematic pressure `p=0`, and constant kinematic viscosity `nu=1.5e-5 m^2/s`. Use laminar momentum transport. 3. Configure `simpleFoam` for exactly 2000 SIMPLE iterations, ASCII output only at iteration 2000, and bounded linear-upwind velocity convection. Source `/opt/openfoam11/etc/bashrc`, run `blockMesh -case /home/user/Desktop/plate` and retain `plate/log.blockMesh`, then run `simpleFoam -case /home/user/Desktop/plate` and retain `plate/log.simpleFoam`; both must finish with `End`, and iteration 2000 must exist. Run `postProcess -case /home/user/Desktop/plate -latestTime -func writeCellCentres` and retain `plate/log.cellCentres`. Run `postProcess -case /home/user/Desktop/plate -solver incompressibleFluid -latestTime -func wallShearStress` and retain `plate/log.wallShearStress` and `plate/2000/wallShearStress`. 4. Write `/home/user/Desktop/postprocess.py`. For all 200 plate faces, combine the `C` and `wallShearStress` patch arrays, sort by x, and calculate `Cf=2*abs(tau_x)/U_infinity^2`, where OpenFOAM wall shear is kinematic. Calculate the local Blasius reference `Cf_theory=0.664/sqrt(Re_x)` with `Re_x=U_infinity*x/nu`, and save `/home/user/Desktop/plate_shear.csv` with `x_m,wall_shear_kinematic_m2ps2,cf,blasius_cf,error_percent`. 5. At the downstream-side face center nearest `x=0.5 m` (the nominal `x=0.5025 m` face, within 0.003 m), require the percentage error against Blasius to be at most 15%, then save `/home/user/Desktop/summary.txt` as exactly `cf, error_percent`. Do not use ParaView or other GUI tools.",
  "source": "https://github.com/openfoam/openfoam-dev",
  "config": [
    {
      "type": "upload_file",
      "parameters": {
        "files": [
          {
            "local_path": "task-06/init_file/plate_base.tar",
            "path": "/home/user/Desktop/plate_base.tar"
          }
        ]
      }
    },
    {
      "type": "launch",
      "parameters": {
        "command": "bash -c \"mkdir -p '/home/user/Desktop/' && tar -xf '/home/user/Desktop/plate_base.tar' -C '/home/user/Desktop/' && rm -f '/home/user/Desktop/plate_base.tar'\"",
        "shell": true
      }
    }
  ],
  "trajectory": "trajectories/",
  "related_apps": [
    "openfoam"
  ],
  "artifact_paths": [
    "/home/user/Desktop/build_case.py",
    "/home/user/Desktop/plate",
    "/home/user/Desktop/plate_shear.csv",
    "/home/user/Desktop/postprocess.py",
    "/home/user/Desktop/summary.txt"
  ],
  "evaluator": {
    "postconfig": [
      {
        "type": "upload_file",
        "parameters": {
          "files": [
            {
              "local_path": "task-06/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"
}