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

snGrad() on fixedValue boundary

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 6 Post By hjasak
  • 1 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2014, 17:47
Default snGrad() on fixedValue boundary
  #1
New Member
 
Join Date: Sep 2014
Posts: 15
Rep Power: 11
Franko is on a distinguished road
Hello.
I have 1-D mesh with 10 cells (each cell - 1 meter length).
And I have fixedValue pressure boundary conditions on my boundaries (walls):

inlet(left) p: fixedValue 2
outlet(right) p: fixedValue 1

Internal pressure = 1

So how fvc::snGrad(p) will be calculated on the left and right boundaries? There is no information about this in OpenFOAM guides. Help!
Franko is offline   Reply With Quote

Old   October 15, 2014, 06:25
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
[(value at the boundary) - (value in the cell)]/distance

Since you are fixing the boundary value, the cell value (solution) will influence your snGrad.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 15, 2014, 14:47
Default
  #3
New Member
 
Join Date: Sep 2014
Posts: 15
Rep Power: 11
Franko is on a distinguished road
Thanks, hjasak!
But could you tell me where I can find this information in OpenFOAM libs?
Franko is offline   Reply With Quote

Old   October 17, 2014, 12:50
Default
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
fvPatchField.C


// Return gradient at boundary
template<class Type>
Foam::tmp<Foam::Field<Type> > Foam::fvPatchField<Type>::snGrad() const
{
return (*this - patchInternalField())*patch_.deltaCoeffs();
}
Franko likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 18, 2014, 18:39
Default
  #5
New Member
 
Join Date: Sep 2014
Posts: 15
Rep Power: 11
Franko is on a distinguished road
Yeah, thanks a lot!
Franko 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
Wind turbine simulation Saturn CFX 58 July 3, 2020 01:13
Floating point exception: Zero divide liladhar CFX 11 December 16, 2013 04:07
domain imbalance for enrgy equation happy CFX 14 September 6, 2012 01:54
Concentric tube heat exchanger (Air-Water) Young CFX 5 October 6, 2008 23:17
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 01:54


All times are GMT -4. The time now is 15:39.