CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

zerogradient in groovy

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 22, 2012, 20:24
Default zerogradient in groovy
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
I want to use zerogradient bc in groovy bc.is it possible?
immortality is offline   Reply With Quote

Old   November 22, 2012, 20:50
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
I want to use zerogradient bc in groovy bc.is it possible?
Code:
gradientExpression "0";
fractionExpression "0";
but the question is "why?" when zeroGradient can do it just as well
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   November 23, 2012, 06:29
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
I want to simulate a cube like cavity but top wall is opening to an environment.the known properties of environment are p0 and T0 only and not velocity.therefore in cells that see outer field the pressure must be replaced in stagnations from inside of the domain as the characteristics and riemann invarient says.after some calculation the velocity of entering fluid can be achieved If I correct.
Now I think if I write formulas in groovy and can replace inner pressure the problem can be solved.
If I write pressure BC as zerogradient without groovyBC and write velocity with formulas including pressure will it replace from neighbouring cells in the domain and is this ok?
Thank you for attention and sorry for long saying.
immortality is offline   Reply With Quote

Old   November 23, 2012, 16:37
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
I want to simulate a cube like cavity but top wall is opening to an environment.the known properties of environment are p0 and T0 only and not velocity.therefore in cells that see outer field the pressure must be replaced in stagnations from inside of the domain as the characteristics and riemann invarient says.after some calculation the velocity of entering fluid can be achieved If I correct.
Now I think if I write formulas in groovy and can replace inner pressure the problem can be solved.
If I write pressure BC as zerogradient without groovyBC and write velocity with formulas including pressure will it replace from neighbouring cells in the domain and is this ok?
Thank you for attention and sorry for long saying.
Sorry. I'm not quite sure what you're saying. Is your problem that you want either a fixed value or a fixed gradient for p depending on whether the velocity goes "in" or "out"? Can be done with groovyBC: with the fractionExpression you can switch a face from fixedValue (1) to fixedGradient (0).

Also check out the "advanced" BCs in OpenFOAM (pressureInletVelocity etc). Maybe what you want is there
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   November 23, 2012, 17:52
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
ok.if I say very clear Its only p0 and T0 conditions from flow that is known.not velocity nor other things except direction of the flow that is normal to boundary.and since the condition changes to moving wall according to a time function I have to use groovyBC.briefly the problem is "how can simulate p0 and T0 boundary conditions in groovyBC?"
can you give me a suggestion please?
immortality is offline   Reply With Quote

Old   October 18, 2013, 05:34
Default
  #6
Member
 
Join Date: Jun 2011
Posts: 65
Rep Power: 6
maalan is on a distinguished road
Quote:
but the question is "why?" when zeroGradient can do it just as well
Hi Bernhard!!

I have a flow past a 2d cylinder inside an O-type mesh. The point is I would like to specify the zeroGradient to be in the freestream direction. Is it possible??

Thanks!!
Best
maalan is offline   Reply With Quote

Old   October 18, 2013, 07:02
Default
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by maalan View Post
Hi Bernhard!!

I have a flow past a 2d cylinder inside an O-type mesh. The point is I would like to specify the zeroGradient to be in the freestream direction. Is it possible??

Thanks!!
Best
That is called "slip" and already built into standard-OpenFOAM
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 18, 2013, 07:11
Default
  #8
Member
 
Join Date: Jun 2011
Posts: 65
Rep Power: 6
maalan is on a distinguished road
Quote:
That is called "slip" and already built into standard-OpenFOAM
I meant I wanted to impose it as outlet patch (a half of the boundary cicumference)... not as a wall.

Thanks!
maalan is offline   Reply With Quote

Reply

Tags
groovybc, zerogradient

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
second order schemes marine OpenFOAM 66 October 26, 2014 12:10
Air Conditioned room groovyBC Sebaj OpenFOAM 7 October 31, 2012 15:16
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08
interFoam andrea.pasquali OpenFOAM 7 May 30, 2010 12:45
ZeroGradient pressure Outlet BC prob (adjustPhi.C) Stylianos OpenFOAM 3 March 23, 2010 13:28


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