CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Mixed BC - heat transfer - laplacianFoam (https://www.cfd-online.com/Forums/openfoam-pre-processing/74593-mixed-bc-heat-transfer-laplacianfoam.html)

STutexas November 19, 2015 00:46

Hi Alex,

Thank you for your explanation. I have been trying (desperately) to code a mixed boundary condition using groovyBC and have not had any success with it. I was hoping to do it wuth mixed boundary condition. Could you take a look at my post and suggest any ideas that you have about implementing a mixed BC on a vector field.

http://www.cfd-online.com/Forums/ope...groovy-bc.html

Thanks again for the help.

Saurabh

STutexas March 7, 2016 02:19

Implementing groovyBC for vectors
 
Quote:

Originally Posted by zfaraday (Post 573892)
Hi Saurabh,

refGrad has a similar meaning than refValue and it is used depending on the Boundary Condition itself. In the case you mention proposed by argonaut its value is 0. However, if the same case had included an extra constant heat flux, for instance a known radiative heat flux, you should have used refGrad in the definition of the Tface expression.

To get a better understanding of what I am talking about, please, take a look at this document.

Hope it helps.

Best regards,


Alex


Hi

I am trying to implement the groovyBC for a vector field instead of a scalar field. When I put in the fractionExpression term in my code it starts to give me a weird solution. Could you explain the implementation of the fractionExpression term for vector?

P.S. I would specifically like to know
If groovyBC turns the scalar value of fractionExperssion in to a vector on implementation?
Does fraction expression affect only the diagonal coefficients of the final coefficient matrix or the non-diagonal coefficients as well?

Thank you.

Saurabh

thiagopl January 12, 2017 12:03

Summary
 
Quote:

Originally Posted by bhh (Post 253071)
3) (dT/dn)_w=h/k (T_w -T_inf). h and T_inf are given, k is the conductivity of the solid material and T_w is the wall temperature (Varies during the computations and along BC patch).

How can I get access to the mixed condition ( 3) above)?
regards
Bjorn

Returning to the initial question. This is what I've got from the two links below.
Firstly, try to understand the treatment given in the "Basic convection". Then, compare the terms of Eq. (5) to the terms of the equation given here. After this, relate these terms with the Usage of the mixed BC.

So, I think this is the answer:
Code:

type            mixed;
refValue <T_inf>
refGradient <0>
valueFraction <f (from the Basic Convection link - note that f is mesh dependent, which might be a problem) >;


STutexas January 12, 2017 12:57

Hi Thiago

You could use the Swak4FOAM and groovyBC library for accessing mesh properties while using mixed Boundary conditions.

f <valuefraction > could be mesh dependent. Swak4FOAM library has some functions that allow one to access mesh properties while setting boundary conditions.

You could also use refCast to extract mesh based values and the update the BC later in the code.

Hope it helps.

Saurabh

Tobi January 13, 2017 04:55

Hi guys,

I just want to inform you that if you want to implement something like that, you can check out my laserConvectionBC and the documentation. There you will find the derivation of the equation and in the source code you can follow how to implement all the stuff. More information about that can be found here: https://bitbucket.org/shor-ty/laserconvectionbc

neilk February 7, 2019 09:57

Hello,

I am trying to apply mixed boundary condition for volScalarField H2O to simulate absorption based on partition coefficients at a wall. I am trying to apply the boundary condition attached in the image below.Attachment 68209

Inorder to implement this I used the following BC:
Code:

BOTTOM
    {
        type            groovyBC;
                value                        uniform 1;
                variables        "Dmuc=4.3e-6;Dmem=1.4e-6;tmem=1e-
                  4;kow=200;liq{BOTTOM}=T;";
                //variables        "Dmuc=1;Dmem=0.1;tmem=1e-4;kow=200;";
                valueExpression        "liq";
        gradientExpression "0";
        fractionExpression "1";
        evaluateDuringConstruction 1;

In the groovyBC above I tried to discretize the gradient of H2O as a result only depending on the patch internal cell field value. But it doesn't take that into account.

Is there a way to implement this type of groovyBC?

Thank you

Nilay


All times are GMT -4. The time now is 06:03.