CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

laplacian foam simulating diffusion through a porous media

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 26, 2012, 15:40
Default laplacian foam simulating diffusion through a porous media
  #1
Member
 
Ronald McDonald
Join Date: Jul 2012
Posts: 38
Rep Power: 4
mcdonalds is on a distinguished road
So, 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.
mcdonalds is offline   Reply With Quote

Old   February 1, 2015, 17:51
Default
  #2
New Member
 
peyman
Join Date: Jan 2015
Posts: 1
Rep Power: 0
peyman_Da is on a distinguished road
Quote:
Originally Posted by mcdonalds View Post
So, 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.
Follow the steps in the following link:

https://openfoamwiki.net/index.php/H...ure_to_icoFoam

I hope it helps you.
peyman_Da is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19


All times are GMT -4. The time now is 20:14.