CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

codedFixedValue b.c. -- How interpolate velocity?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2024, 21:54
Default codedFixedValue b.c. -- How interpolate velocity?
  #1
New Member
 
anonymous
Join Date: Jul 2024
Posts: 1
Rep Power: 0
bepps is on a distinguished road
Hi folks, I am trying to develop a codedFixedValue boundary condition in the attached file, and I need help with some API things:

-- How do I interpolate the velocity field at a given (x,y,z) point? (line 157)

-- How do I get the (x,y,z) coordinates of the locations on the patch where the boundary condition is to be applied? (lines 178--182)

-- How do I prescribe the boundary condition? (line 194)

-- Do I need to do anything special to enable this boundary condition to be used in simulations on multiple processors?

My desired b.c. applies to swirling flows, such as a propeller, where the pressure field should vary radially according to the normal momentum equation, dp/dr = rho * Vt^2 / r, where Vt is the tangential (swirl) component of velocity. I need to interpolate the velocity at several points on the outlet, compute the desired pressure distribution, p(r), and then apply that pressure at the actual boundary points in the mesh. The attached code has all this theory implemented, but I am struggling with the OpenFOAM 11 API. Can anyone please help me fill in the blanks? Thanks in advance!
Attached Files
File Type: txt p_codedFixedValueBC.txt (7.7 KB, 3 views)
bepps is offline   Reply With Quote

Old   September 24, 2024, 07:04
Default Wolfdynamics pressentation
  #2
Member
 
Bas Nieuwboer
Join Date: Mar 2013
Posts: 34
Rep Power: 13
bjnieuwboer is on a distinguished road
Hi,

You could take a look at http://www.wolfdynamics.com/wiki/prog_codestreamBC.pdf. There they implement a parabolic velocity profile using codeStream or codedFixedVale.

I hope this helps you.
bjnieuwboer is offline   Reply With Quote

Reply

Tags
boundary condition, codedfixedvalue, velocity interpolation


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
interpolate 1D velocity profile on 2D surface topheruk29 FLUENT 1 January 15, 2023 07:26
codedFixedValue to couple velocity and pressure? seilgu OpenFOAM Running, Solving & CFD 0 March 20, 2022 04:13
Paraview how to interpolate velocity component onto a grid zyfsoton OpenFOAM Post-Processing 0 February 4, 2022 10:50
Velocity slip+temperature jump B.C. anon_d Fluent UDF and Scheme Programming 1 April 27, 2011 09:39
is there mass outflow or velocity outflow B.C. kk FLUENT 1 April 12, 2007 11:55


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