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

fixedValue BC with zeroGradient

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2020, 12:39
Default fixedValue BC with zeroGradient
  #1
Senior Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 165
Rep Power: 6
Gerry Kan is on a distinguished road
Howdy Foamers:

Lately I have been thinking about implementing a sort of boundary condition that allows me to specify a fixed value at the boundary, but at the same time with zero shear stress, similar to ehat happens at a free surface.

My 'classical' training tells me that such discretization is not possible, but based on a simple analysis, I should be able to produce a non-trivial solution without over- or under-constraining my system of equations.

Is there a type of BC in OF that I could derive my implementation on?

Thanks in advance, Gerry.
Gerry Kan is offline   Reply With Quote

Old   June 12, 2020, 03:42
Default
  #2
Senior Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 165
Rep Power: 6
Gerry Kan is on a distinguished road
Last night I have been looking into how boundary conditions are applied in OpenFOAM in more detail (particularly the mixed boundary condition).

I notice that each BC has four common functions:

- valueInternalCoeffs
- valueBoundaryCoeffs
- gradientInternalCoeffs
- gradientBoundaryCoeffs

Based on the description, the terms "Internal" and "Boundary" refers to the matrix and source term side of the linearized equation coefficients.

What I don't know if whether the "value" and "gradient" member functions have to be mutually exclusive. That is, if I use one set, I cannot use another and, if I wish to use them both together, I need to "blend" them, for example the weighting factor in the mixed boundary condition?

Thanks, Gerry.
Gerry Kan is offline   Reply With Quote

Old   July 11, 2020, 06:54
Default
  #3
New Member
 
Stephan
Join Date: Aug 2017
Posts: 2
Rep Power: 0
Steve80 is on a distinguished road
Hi Gerry, what you could do is to set the nu, nut values to zero at the boundary face. I use this trick to prevent diffusion of species through an inlet patch, where a fixed concentration is specified, but transient value of the mass flow rate can be zero.
Best regards
Stephan
Steve80 is offline   Reply With Quote

Old   July 11, 2020, 08:24
Default
  #4
Senior Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 165
Rep Power: 6
Gerry Kan is on a distinguished road
Hello Stephen:

Thanks for the tip. To be honest I haven't thought about such approach, and I think that should work. One question for you, though. Did you do this only on RANS turbulence model, or did you also try this on LES and DNS and got the desired result you had.

Again thanks, Gerry.

Quote:
Originally Posted by Steve80 View Post
Hi Gerry, what you could do is to set the nu, nut values to zero at the boundary face. I use this trick to prevent diffusion of species through an inlet patch, where a fixed concentration is specified, but transient value of the mass flow rate can be zero.
Best regards
Stephan
Gerry Kan is offline   Reply With Quote

Old   July 12, 2020, 14:57
Default
  #5
New Member
 
Stephan
Join Date: Aug 2017
Posts: 2
Rep Power: 0
Steve80 is on a distinguished road
Hi Gerry, so far I only used it with RANS. You can set the molecular viscosity to zero, but I donít know whether it is possible to suppress the turbulent fluctuations as well on a boundary face.
Good luck ;-)
Kind regards
Stephan
Steve80 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
change boundary condition when switching solver Virtual-iCFD OpenFOAM Running, Solving & CFD 3 August 14, 2019 05:02
rSF: p divergence in combustor (wt negative value) zonda OpenFOAM Pre-Processing 4 April 10, 2018 06:59
uniformTotalPressure BC problems Slanth OpenFOAM 2 January 12, 2015 02:04
[swak4Foam] Air Conditioned room groovyBC Sebaj OpenFOAM Community Contributions 7 October 31, 2012 14:16
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 17:08


All times are GMT -4. The time now is 09:54.