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

Gas permeation into solid: What boundary condition?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 30, 2016, 08:27
Default Gas permeation into solid: What boundary condition?
  #1
New Member
 
Chris
Join Date: Dec 2016
Location: Cambridge, UK
Posts: 2
Rep Power: 0
cstuart is on a distinguished road
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:
  1. Adapt the externalWallHeatFluxTemperature boundary condition
  2. Use a codedFixedValue BC
  3. Build a multi region solver?

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());
but I don't see anything here which looks like a rearrangement of "-k grad(Tb) = h (T_a - Tb)" (with T_a and T_b as ambient and boundary temperatures) as I would expect. What exactly are the refValue and valueFraction supposed to be calculating (and where should I have been able to look that up myself)?

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/
cstuart is offline   Reply With Quote

Reply


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


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


All times are GMT -4. The time now is 01:35.