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

How to set Uy and Uz to zero

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 26, 2018, 15:19
Default How to set Uy and Uz to zero
  #1
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,676
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
If it matters, I'm using OF 1.7 and 2.4

Currently I am using mapFields to map the entire velocity vector field from one case to another. But I would like to use mapFields to map only Ux from an existing case and leaev Uy and Uz alone. For my purpose I actually do want to set Uy and Uz to zero. Alternatively, I could map the vector U using mapFields and then overwrite Uy and Uz with zeros (using setFields for example). Do these utilities support manipulating only components of vector fields? What would be the syntax?

edit* I found a solution using funkySetFields.
Code:
funkySetFields -field U -expression 'vector(U.x,0,0)'

But it would be nice if someone has the solution using mapFields or setFields
LuckyTran is offline   Reply With Quote

 


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



All times are GMT -4. The time now is 13:40.