CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Need help with programming syntax for modifying laplacianFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/196441-need-help-programming-syntax-modifying-laplacianfoam.html)

rareshubham December 5, 2017 01:02

Need help with programming syntax for modifying laplacianFoam
 
1 Attachment(s)
Hello all!
I have just started learning OpenFOAM. I understand the structure and I able to understand and run most tutorials. Now I want to go to the next level and start developing solvers.
I have taken up a very simple problem to start with - Heat generation in a rectangle block.
I want to modify laplacianFoam and add the heat generation part to it. I want to define a cylindrical region in the mesh and then specify a source term inside it and 0 everywhere else.
I have read the programmers guide but I have still not completely understood the syntax of commands.
I know what steps to take to develop this solver but can someone please show me the ropes of how to write commands to find the center of the mesh and then how to assign a source term to all the cells within a small cylinder at the center. Basically, how should I go about finding this kind of information for any variables and expressions that I will use for future solver development.
Thank you!


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