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

zero flux boundary conditon

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2020, 00:43
Post zero flux boundary conditon
  #1
New Member
 
Lie Wei
Join Date: Sep 2020
Posts: 4
Rep Power: 6
Lie Wei is on a distinguished road
hi, everyone
I have a question about the boundary condition for the following species transport equation:
-fvm::laplacian(Dc, C) +fvm::div(phi, C) == 0
and I want to set the flux of C to be zero for my b.cs, which is given as:
-DC*dC/dn + Un*C == 0
where n is the normal direction of b.c
I use the codedmixed to implement my b.c as following:
outlet
{
type codedMixed;
refValue uniform 0;
refGradient uniform 0;
valueFraction uniform 1;

name zeroFlux;

code
#{
fvPatchField<scalar> C
(
patch().lookupPatchField<volScalarField, scalar>("C")
);
fvPatchField<vector> U
(
patch().lookupPatchField<volVectorField, vector>("U")
);
scalarField Ux = U.component(vector::X);
this->refValue() = 0.0;
this->refGrad() = - Ux / 1.05e-8 * C;
this->valueFraction() = 0.0;
#};
}

where 1.05e-8 is Dc

The above code worked, but the results are quit different from COMSOL's (a FEM software) calculations. I don't know where I made the mistake, can anyone help?
Lie Wei is offline   Reply With Quote

Old   September 3, 2020, 05:39
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


Why don't you just use the zeroGradient BC instead?
simrego is offline   Reply With Quote

Old   September 9, 2020, 00:13
Default
  #3
New Member
 
Lie Wei
Join Date: Sep 2020
Posts: 4
Rep Power: 6
Lie Wei is on a distinguished road
hi,anonymous
the BC I need is
-DC*dC/dn + Un*C == 0
I think zeroGradient mean
-DC*dC/dn == 0?
Lie Wei is offline   Reply With Quote

Reply

Tags
boundary condition


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
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 17, 2020 00:44
Centrifugal fan j0hnny CFX 13 October 1, 2019 14:55
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 11:20
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 05:39
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 07:18


All times are GMT -4. The time now is 21:00.