|
[Sponsors] |
Gas permeation into solid: What boundary condition? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 30, 2016, 08:27 |
Gas permeation into solid: What boundary condition?
|
#1 |
New Member
Chris
Join Date: Dec 2016
Location: Cambridge, UK
Posts: 2
Rep Power: 0 |
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); Qr /= Tp; refGrad() = 0.0; refValue() = hp*Ta_/(hp - Qr); valueFraction() = (hp - Qr)/((hp - Qr) + kappa(Tp)*patch().deltaCoeffs()); 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/ |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 13:55 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 05:15 |
Time dependant pressure boundary condition | yosuke1984 | OpenFOAM Verification & Validation | 3 | May 6, 2015 06:16 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 00:00 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 12, 2001 23:19 |