CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

momentum source with udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 15, 2016, 23:55
Default momentum source with udf
  #1
New Member
 
Ahmet
Join Date: Jun 2016
Posts: 4
Rep Power: 9
firfilik is on a distinguished road
we have unit cell, lenght of it 3.66 m and we want to define momentum source at certain intervals with udf. How would I define it.
firfilik is offline   Reply With Quote

Old   June 16, 2016, 00:02
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
You need to build DEFINE_SOURCEs for all three momentum components. The DEFINE_SOURCE will pass the cell and thread when it is called. You can use that to look up the cell centroid with C_CENTROID(X,cell,thread) where X is real X[ND_ND]. Then you can compute the momentum sources based on position information. It is a pretty textbook application of the DEFINE_SOURCE UDF mechanism.
mprinkey is offline   Reply With Quote

Old   June 16, 2016, 00:24
Default
  #3
New Member
 
Ahmet
Join Date: Jun 2016
Posts: 4
Rep Power: 9
firfilik is on a distinguished road
thank you Michael but I could not figure out how ı would place momentum source at 2 meters or 3 meters in udf
firfilik is offline   Reply With Quote

Old   June 16, 2016, 00:38
Default
  #4
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
Quote:
Originally Posted by firfilik View Post
thank you Michael but I could not figure out how ı would place momentum source at 2 meters or 3 meters in udf
Come on! You have the location vector for each cell as the DEFINE_SOURCE is called using the C_CENTROID macro. So, put in some tests to check if the cell is located near where you want the source and if so, set the source to the value you need. Otherwise, set it to zero.

DEFINE_SOURCE is one of the easiest UDFs to code. All of the parts on in the basic example in the ANSYS documentation.

https://www.sharcnet.ca/Software/Flu...udf/node46.htm
mprinkey 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 in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 10:03
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
UDF for spatially dependent momentum source ngallandat3 Fluent UDF and Scheme Programming 14 July 27, 2014 12:21
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 01:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59


All times are GMT -4. The time now is 20:33.