- **OpenFOAM Running, Solving & CFD**
(*https://www.cfd-online.com/Forums/openfoam-solving/*)

- - **laplacian foam simulating diffusion through a porous media**
(*https://www.cfd-online.com/Forums/openfoam-solving/105282-laplacian-foam-simulating-diffusion-through-porous-media.html*)

laplacian foam simulating diffusion through a porous mediaSo, I'm not able to get openFoam to work. The first thing I did was copy all of the laplacianfoam source files and renamed them myplacianfoam. A few things that I did after that:
1) In the file laplacianFoam.C within the while loop I added: solve ( fvm::ddt(O2) ==laplacian(Deff, O2) ); Now, I'm not sure if I should add the equation alongside the original equation in laplacianFoam.C or delete the original and replace it with the one above. Also, I do not know how to add the effective diffusion to the equation, or how to carry out the effective diffusion equation. The one that goes like: Deff = D * porosity/tortuosity. I would like to be able to input both the porosity and the tortuosity and the diffusion coefficient but I'm not sure how to do that either. 2) In the file createfields.H within the source code I added: Info<< "Reading field O2\n" << endl; volScalarField O2 ( IOobject ( "O2", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); The O2 stands for the concentration of O2. Here I will need to add a file "O2" (concentration of oxygen) to the 0 "initial" folder, add the concentrations on certain boundaries and the run the simulation. So I think I understand how to at least input the concentration of O2. 3) Last thing I did was replace laplacian foam with mylaplacian foam in the file folder contained in "Make". So, that's where I am stuck. In summary: 1) How and where do I input dcO2/dt=laplacian(Deff,cO2)? 2) How and where do I carry out the effective diffusion equation? 3) I'd really like to be able to input the oxygen concentration ( I think I know how to do this), diffusion coefficient, porosity, and tortuosity, and output the concentration of oxygen. |

Quote:
https://openfoamwiki.net/index.php/H...ure_to_icoFoam I hope it helps you. |

All times are GMT -4. The time now is 04:30. |