Gas permeation into solid: What boundary condition?
Hello all,
I'm getting to grips with using OpenFOAM for the first time at the moment, so apologies for any obvious questions asked! The simplified problem which I am starting with is one of mass diffusion through a solid and radioactive decay. For this I have written a very basic solver based on dT/dt + λT - ∇^2 (DT)No problems there, or at least none to be discussed in this thread. I want to introduce the gaseous substance T to the solid via an interface to a mixture of gases including T. To do this, I see 3 possible solutions:
The first option seems like the most elegant, given the similarity between the heat and mass diffusion problems and the fact that I will want to be able to model heat convection too later on, but looking at the source code doesn't immediately make it obvious to me how it works. It seems the important lines in "externalWallHeatFluxTemperatureFvPatchScalarField .C" [1] are 296-302: Code:
hp = 1.0/(1.0/h_ + totalSolidRes); For the second option, I would perhaps calculate the flux in and multiply by a time step, adding this flux to the previous values in boundary cells? This doesn't strike me as the way things are supposed to be done in OpenFOAM, so I haven't investigated further than these examples [2] of using codedFixedValue. Is maybe the third option the best, defining a new region which handles the "-k grad(Tb) = h (T_a - Tb)" equation and linking that region to the diffusion-through-a-solid region? Like I say, I am very new and have not yet learnt how that would work, but perhaps it turns out to be the simplest solution? Thanks for any advice you can give. Chris [1] externalWallHeatFluxTemperatureFvPatchScalarField. C [2] http://www.sourceflux.de/blog/the-co...ary-condition/ |
All times are GMT -4. The time now is 06:30. |