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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
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,675
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

Old   March 4, 2018, 15:02
Default
  #2
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13
HakikiCanakkaleli is on a distinguished road
Quote:
I actually do want to set Uy and Uz to zero.
I would utilise sed or awk to make them zero instead of seeking for an unconventional solution with the OpenFOAM tools. Just a humble idea to alleviate such pain. Might find useful, don't know. :]
HakikiCanakkaleli 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



All times are GMT -4. The time now is 07:06.