CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] groovyBC for extrapolation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By gschaider
  • 1 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 16, 2014, 05:58
Default groovyBC for extrapolation
  #1
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 17
Tushar@cfd is on a distinguished road
Dear ALL,

I wish to extrapolate internal fields on to the Wall Boundary condition instead of zeroGradient condition.

The following extrapolation I wish to use:

Code:
tau[wall] = average(tau) - average(normal)*(Sum( (normal[i]-average(normal))*(tau[i]-average(tau)) )/ Sum (pow((normal[i]-avg(normal)),2) )
where, i depends on the number of neighbouring faces surrounding the cell centre near the wall patch;
normal[i] are the distance of face centres (tau[i]);
Sum depends on the i;
average(tau) is the mean of tau[i];
average(normal) is the mean of normal[i];

How would I progress for the same?

Thanks in Advance!
Tushar@cfd is offline   Reply With Quote

Old   September 17, 2014, 17:22
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Tushar@cfd View Post
Dear ALL,

I wish to extrapolate internal fields on to the Wall Boundary condition instead of zeroGradient condition.

The following extrapolation I wish to use:

Code:
tau[wall] = average(tau) - average(normal)*(Sum( (normal[i]-average(normal))*(tau[i]-average(tau)) )/ Sum (pow((normal[i]-avg(normal)),2) )
where, i depends on the number of neighbouring faces surrounding the cell centre near the wall patch;
normal[i] are the distance of face centres (tau[i]);
Sum depends on the i;
average(tau) is the mean of tau[i];
average(normal) is the mean of normal[i];

How would I progress for the same?

Thanks in Advance!
internalField(tau) gives you a field with the values of the cells next to the patch. All the other things (average, sum, normal(), pow) are named exactly the way you wrote them
nimasam likes this.
__________________
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   September 19, 2014, 00:56
Default
  #3
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 17
Tushar@cfd is on a distinguished road
Quote:
internalField(tau) gives you a field with the values of the cells next to the patch. All the other things (average, sum, normal(), pow) are named exactly the way you wrote them
Thanks a million Bernhard,

You mean to say I should use the following expression

{
type groovyBC;
variables "taui=internalField(tau);normali=internalField(nor mal());";
valueExpression "tau = average(tau) - average(normal())*(Sum( (normali-average(normal()))*(taui-average(tau)) )/ Sum (pow((normali-average(normal())),2) )";
...
}

Please correct me if I am wrong
Tushar@cfd is offline   Reply With Quote

Old   September 23, 2014, 13:48
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Tushar@cfd View Post
Thanks a million Bernhard,

You mean to say I should use the following expression

{
type groovyBC;
variables "taui=internalField(tau);normali=internalField(nor mal());";
valueExpression "tau = average(tau) - average(normal())*(Sum( (normali-average(normal()))*(taui-average(tau)) )/ Sum (pow((normali-average(normal())),2) )";
...
}

Please correct me if I am wrong
sum should be lower-case. But looks alright apart from that
Tushar@cfd likes this.
__________________
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   March 14, 2015, 03:09
Default
  #5
New Member
 
Ehsan Mahravan
Join Date: Dec 2014
Location: Tehran, Iran
Posts: 9
Rep Power: 11
EhsanMh is on a distinguished road
Quote:
Originally Posted by Tushar@cfd View Post
Thanks a million Bernhard,

You mean to say I should use the following expression

{
type groovyBC;
variables "taui=internalField(tau);normali=internalField(nor mal());";
valueExpression "tau = average(tau) - average(normal())*(Sum( (normali-average(normal()))*(taui-average(tau)) )/ Sum (pow((normali-average(normal())),2) )";
...
}

Please correct me if I am wrong
Dear Tushar & Bernhard
I want to use extrapolation you explained here, but when i use the following code:

variables "pi=internalField(p); normali=internalField(normal());";

i get the following error:

--> FOAM FATAL ERROR:
Parser Error for driver PatchValueExpressionDriver at "1.15-20" :"syntax error, unexpected TOKEN_normal"
"internalField(normal())"
^^^^^^
----------------|
EhsanMh is offline   Reply With Quote

Old   September 23, 2015, 16:14
Default
  #6
New Member
 
Join Date: Jul 2014
Posts: 26
Rep Power: 11
Minisasi is on a distinguished road
Hello,
I want to impose on my boundary something like:

Code:
 T_b = T_s/5
where
T_b is the temperature at my boundary
T_s is the temperature at the position S .

Is there a way to extrapolate that value at S, and impose it at the boundary?

Thank you in advance,
Cheers
Minisasi 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
[swak4Foam] groovyBC for oscillatory flow liybzd OpenFOAM Community Contributions 5 November 12, 2018 07:53
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC zanilu70 OpenFOAM Community Contributions 4 December 13, 2016 06:46
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam dani2702 OpenFOAM Community Contributions 0 November 17, 2016 03:30
[swak4Foam] groovyBC issue - k and epsilon sagnikmazumdar OpenFOAM Community Contributions 24 March 1, 2015 07:16
[swak4Foam] groovyBC and Eqn.setReference() benk OpenFOAM Community Contributions 3 June 2, 2011 08:49


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