{"id":18380582,"url":"https://github.com/piyueh/openfoam-pipe-flow-verification","last_synced_at":"2025-04-11T16:46:38.294Z","repository":{"id":79981766,"uuid":"482669184","full_name":"piyueh/openfoam-pipe-flow-verification","owner":"piyueh","description":"Reproducibility package for the verification of laminar 3D pipe flow w/ OpenFOAM","archived":false,"fork":false,"pushed_at":"2022-04-18T09:38:32.000Z","size":4156,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T23:28:51.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piyueh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-18T00:46:48.000Z","updated_at":"2024-11-21T00:20:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8ef0027-c764-4e61-8181-66bf03d3cd45","html_url":"https://github.com/piyueh/openfoam-pipe-flow-verification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyueh%2Fopenfoam-pipe-flow-verification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyueh%2Fopenfoam-pipe-flow-verification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyueh%2Fopenfoam-pipe-flow-verification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyueh%2Fopenfoam-pipe-flow-verification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piyueh","download_url":"https://codeload.github.com/piyueh/openfoam-pipe-flow-verification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248442500,"owners_count":21104197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T00:43:04.120Z","updated_at":"2025-04-11T16:46:38.268Z","avatar_url":"https://github.com/piyueh.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"A reproducibility package for simulation verification of pipe flow with OpenFOAM.\n\n## Usage\n--------\n\n### Creating a Singularity/Apptainer image\n-------------------------------------------\n\nWe use a Singularity (or what is now named Apptainer) image to provide all required tools (e.g.,\nOpenFOAM, Gmsh, Python, etc.). Using a Singularity image guarantees that we don't need to install\nanything else on working machines or HPC clusters.\n\nIf the current user has root privilege, then simply do (assuming currently under the repo folder):\n\n```shell\n# singularity build openfoam9.sif ./Singularity\n```\n\nIf the current user does not have root privilege, try\n\n```shell\n$ singularity build --fakeroot openfoam9.sif ./Singularity\n```\nThe above command requires the system admins to correctly configure the user namespace. To see if\nthe user namespace is configured correctly, check the files `/etc/subuid` and `/etc/subgid` and find\nthe line with your username and your group:\n\n```shell\n$ cat /etc/subuid\n-------------------\n...\n\u003cyour username\u003e:\u003ca number much greater than 65535\u003e:\u003ca number greater than 98765\u003e\n...\n```\n\n```shell\n$ cat /etc/subgid\n-------------------\n...\n\u003cthe group you belong to\u003e:\u003ca number much greater than 65535\u003e:\u003ca number greater than 98765\u003e\n...\n```\n\nIf these two options do not work for you, try the cloud builders: https://cloud.sylabs.io/builder\n\nFinally, if using Apptainer (the newer community version of Singularity), just substitute\n`singularity` with `apptainer`.\n\n\n### Creating case folders\n-------------------------\n\nTo create case folders:\n\n```shell\n$ singularity exec openfoam9.sif python ./main.py\n```\n\nAs this is a reproducibility package, what cases to create are hard coded.\n\nTo create a custom case, use the following command to see how to use `main.py` to do so:\n\n```shell\n$ singularity exec openfoam9.sif python ./main.py --help\n```\n\n***Note***!! The script `main.py` will create mesh files on the fly. Generating meshes requires a\nnon-trivial amount of memory, especially for the case `airflow-pipe-256` (and `airflow-pip-512`, if\nit exists). It may crash on small personal desktops and laptops.\n\n\n### Running cases\n-----------------\n\nEach case has a file `job.sh` that can be used as either a Slurm job script or a regular shell\nscript.\n\nIf using it as a Slurm script, note that the resource configuration in `job.sh` is based on the\nPegasus cluster at the George Washington University. You may need to manually change the\nconfiguration based on your cluster.\n\nTo submit a case using Slurm:\n\n```shell\n$ cd \u003ca case folder\u003e\n$ sbatch job.sh\n```\n\n`job.sh` uses the OpenFOAM installation in the Singularity/Apptainer image. So the cluster must\nhave Singularity/Apptainer. The script assumes the cluster uses Lmod and loads\nSingularity through `module load singularity`. The cluster also needs OpenMPI 4.0+ and loads\nOpenMPI through `module load openmpi/gcc/64/4.1.0`. Modify them based on the actual clusters being\nused.\n\nTo run a case using a regular Linux machine:\n\n```shell\n$ sh ./job.sh \u003cnumber of MPI processes to use\u003e\n```\n\n## Results\n----------\n\n* Absolute error (against analytical soln.) at cross section z=0.135m\n  ![abserr0135](./figs/abs_err_z_0135.png)\n* Relative error (against analytical soln.) at cross section z=0.135m\n  ![relerr0135](./figs/rel_err_z_0135.png)\n* Error convergence of the maximum velocity in the entire domain\n  ![errmax](./figs/abs_err_umax_entire.png)\n* Error convergence of the maximum velocity at cross section z=0.135m\n  ![errmax0135](./figs/abs_err_umax_z_0135.png)\n* Error convergence of the $L_\\infty$ at cross section z=0.135m\n  ![l2135](./figs/abs_err_linf_z_0135.png)\n* Error convergence of the $L_2$ at cross section z=0.135m\n  ![l2135](./figs/abs_err_l2_z_0135.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyueh%2Fopenfoam-pipe-flow-verification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiyueh%2Fopenfoam-pipe-flow-verification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyueh%2Fopenfoam-pipe-flow-verification/lists"}