CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to add WSGGM model to OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2021, 10:50
Default How to add WSGGM model to OpenFOAM
  #1
New Member
 
Hosam Alrefaie
Join Date: Jul 2021
Posts: 24
Rep Power: 5
HosamAlrefaie is on a distinguished road
Hi, I would like to share with how to add Weighted Sum of Grey Gases Model to OpenFOAM (OF) v2106, (Windows-Docker Desktop).

I have tried a lot to reach this, and finally, I would like to share how I have done that. also I have faced a difficulty in in having a shared folder between Windows and Docker (Linux), and it also included in the steps.


1- Download Docker Desktop (DD) and follow the instruction of installation from [1]

2- Copy the command of the image you want from [2], in my case I have copied “Default”

3- Paste the command in Windows PowerShell and wait for it to download OpenFOAM2106.

4- Open DD and go to “Images”, on the image of OF, click Run.

5- When the pop-up window you have, write a name for the container, and under Volumes choose the path for the folder you want it to be shared between Windows and Linux. This file is where you can save your cases.

6- In the Container Path, write any path you want, but it have to be different from the path of where OF files are (/usr/lib/openfoam/openfoam2106), you can write for example “/home/openfoam/” or any other path you prefer.

7- Now go to Containers / Apps and click start on the container you have just created, then click on CLI

8- Write the command "openfoam2106" to start OpenFOAM-2106

9- Write "ls" then press Enter just to see what you have

10- Now navigate to the source file by writing the command cd usr/lib/openfoam/openfoam2106/src

11- Again, "ls" just to see what you have

12- Now open Windows PowerShell and copy the two WSGGM C & H files, by writing the command "docker cp C:\Users\[your user name]\path\where\wsggm\folder\is\located [your container name]:/usr/lib/openfoam/openfoam2106/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/"
You can find these C & H files from [3], download them and name them what ever you like, I have named them "wsggmAbsorptionEmission.C" & "..ssion.H" and placed them inside a folder named "wsggmAbsorptionEmission"
And you can know your container name from [4]

13- Write the command "cd /usr/lib/openfoam/openfoam2106/src/thermophysicalModels/radiation" or just write "cd .." two times so you go back to …/radiation/

14- Write "wclean -a" Enter, then "wmake -a" Enter, and wait.

15- Then go …/radiation/Make/

16- Type the command "vi file", and add the this line submodels/absorptionEmissionModel/wsggmAbsorptionEmission/wsggmAbsorptionEmission.C, Add it under /* Absorption/Emission model */ just for good organization of files.

17- Then navigate …/absorptionEmissionModel/wsggmAbsorptionEmission/ and type the command "wmake wsggmAbsorptionEmission.C"

18- Now it should work with OF. Good luck.

Hopefully this is helpful for someone

Now, actually, I need some help in using the model itself, and how to set it up properly?

Best,
Hosam
[1] https://docs.docker.com/desktop/windows/install/
[2] https://hub.docker.com/u/opencfd
[3] https://github.com/arvindjp/OpenFOAM...rptionEmission
[4] https://stackoverflow.com/questions/...ner-on-windows
HosamAlrefaie is offline   Reply With Quote

Reply

Tags
adding models, docker, openfoam, shared files, wsggm


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 06:29
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 11 June 6, 2018 00:48
how to add turbulence model in OpenFoam Salim OpenFOAM 7 January 30, 2017 21:26
Simulating an aether model of EM using OpenFoam? lamare Electromagnetics 2 September 15, 2016 06:08
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32


All times are GMT -4. The time now is 07:16.