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

[swak4Foam] funkySetFiekds - linear velocity distribution

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2014, 05:14
Default funkySetFiekds - linear velocity distribution
  #1
Senior Member
 
Join Date: Jan 2014
Posts: 179
Rep Power: 12
hxaxtma is on a distinguished road
Hi,

I need to set for my case the internal field to a linear Velocity distribution from 0 to 1. How can I apply this with funkySetFields? I am not sure how to formulate the expression itself


Thanks for all
hxaxtma is offline   Reply With Quote

Old   January 31, 2014, 06:26
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 hxaxtma View Post
Hi,

I need to set for my case the internal field to a linear Velocity distribution from 0 to 1. How can I apply this with funkySetFields? I am not sure how to formulate the expression itself


Thanks for all
"linear distribution" in what sense (in space?). Write down the equation and you're halfway there (but your question is a bit to vague to properly help you)
__________________
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   January 31, 2014, 08:29
Default
  #3
Senior Member
 
Join Date: Jan 2014
Posts: 179
Rep Power: 12
hxaxtma is on a distinguished road
sorry for lack of information:

I think I am almost there, the vel. distribution should be in space


this is my code:
Code:
funykSetFields -case . -field U - expression 'pos().z/max(pos().z)*vector(1,0,0)' -time 0 -keepPatches

No I get my linear profile.


Is there a more elegant way to set up the expression?
hxaxtma is offline   Reply With Quote

Old   January 31, 2014, 19:51
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 hxaxtma View Post
sorry for lack of information:

I think I am almost there, the vel. distribution should be in space


this is my code:
Code:
funykSetFields -case . -field U - expression 'pos().z/max(pos().z)*vector(1,0,0)' -time 0 -keepPatches

No I get my linear profile.


Is there a more elegant way to set up the expression?
Not more elegant, but more accurate : I'd suggest "interpolateToCell(max(pts().x))" if you want the profile to 'end' at the boundary of the geometry not at the center of the uppermost cell
hxaxtma 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   February 2, 2014, 11:35
Thumbs up
  #5
Senior Member
 
Join Date: Jan 2014
Posts: 179
Rep Power: 12
hxaxtma is on a distinguished road
Thanks Gschaider,

Thread is closed
hxaxtma 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
Velocity fluctuation distribution near a wall Matthieu FLUENT 1 June 3, 2021 10:40
Is this velocity distribution around an airfoil plausible? docinger OpenFOAM Running, Solving & CFD 3 September 21, 2013 16:21
velocity distribution in a channel hydraulics Main CFD Forum 0 December 25, 2012 04:25
solution diverges when linear upwind interpolation scheme is used subash OpenFOAM 0 May 29, 2010 02:23
boundary with velocity distribution cfd123 FLOW-3D 3 February 17, 2010 10:44


All times are GMT -4. The time now is 08:19.