CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/58294-boundary-condition.html)

alberto February 1, 2007 15:50

I have to implement a BC in th
 
I have to implement a BC in the form:

T = -A(T) * dT/dn + B

where B is not function of T.

I examined the mixedFvPatchField, but I've some doubt on how to adapt it to my case. What is it's analytical expression?

In the evaluate function it says:

Field<type>::operator=
(
valueFraction_*refValue_
+
(1.0 - valueFraction_)*
(
this->patchInternalField()
+ refGrad_/this->patch().deltaCoeffs()
)
);

The comment in the code says it calculates the field on the patch, but, if so, why does the patchInternalField is present?
Does this mean the BC is implemented in the following form?

T = valueFraction*refValue + (1-refValue)(T + refGrad/DeltaCoeff)

Thanks in advance,
Alberto

alberto February 2, 2007 14:47

I answer to myself: the patchI
 
I answer to myself: the patchInternalField is present because to calculate the field it's necessary to know the value in the cell centre.

Sorry, I confused it...I shouldn't post a question when sleepy :-))

A.

r2d2 November 25, 2008 07:28

Hi, How can one access/modif
 
Hi,
How can one access/modify the value of "valueFraction" in a mixed bc at runtime?
So if my U boundary value at a patch cell face checks against some given value (in this first case itīs a zero gradient bc <=> valueFraction = 0) then I want to switch valueFraction to 1 (known value) and set the value of U at the patch to the value I checked against. U bc, are declared as nonuniform lists on that patch (and of course change the bc for pressure accordingly).
Is this possible?
Cheers,
Radu


All times are GMT -4. The time now is 23:12.