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

FixedProfile polynomial Boundary Condition - Advice Please

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By basecase
  • 1 Post By bigphil

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2021, 01:09
Default FixedProfile polynomial Boundary Condition - Advice Please
  #1
New Member
 
John
Join Date: Jul 2019
Posts: 7
Rep Power: 7
basecase is on a distinguished road
Hi all - I'm an OpenFoam user but sadly, no coder

I currently use OpenFoam 7

I've used the fixedProfile inlet boundary condition with .csv files routinely without problem.

I am however stuck on the section in fixedProfileFvPatchField which refers to type as fixedProfile with profile assigned as - polynomial for the inlet BC.

I've researched fairly extensively and I apolgise if I missed a reference elsewhere that clarifies usage and might end my confusion. There are some references which refer to polynomials in profiles - but they don't seem to match my cases. The user guide alludes to polynomial functions in time dependent BCs - but those refs don't relieve my confusion.

I would be very grateful if some kind soul would explain in simple terms the numbers in the example quoted in fixedProfileFvPatchField documentation (below)-



inlet { type fixedProfile; profile polynomial ( ((1 0 0) (0 0 0)) ((-6200 0 0) (2 0 0)) ); direction (0 1 0); origin 0.0127; }


also U file from 0 folder for fully functioning pitzDaily version attached.


I have worked out some of the numbers - the max velocity of the function in the first set - and of course the direction and origin refs. I just can't quite get a handle on the remaining numbers - one looks like a coefficient for the profile function (in the above a parabola).

When I cut and paste the above into U in the 0 folder for pitzDaily the BC does indeed work well and deliver just what it says. Sadly that still hasn't brought enlightenment.
Attempts to plot the line function from the inlet (U @ t=0) in a spreadsheet have yielded little reward in terms of understanding - but a really nice parabola .

I have another less well defined question on this - the use of the term polynomial as in the attached (and above) implies the profile is flexible and not simply a parabolic profile function application. An understanding of the numbers will likely help me - but I would be grateful for any advice from those that have used this boundary condition to apply polynomials other than or in addition to parabolic functions as the inlet profile.

One last point - I'm not looking for alternative solutions to apply at this point - I'm on a mission of understanding that which I currently fail to grasp. And any advice of help would be very much appreciated.

Thanks

John Base
Attached Files
File Type: txt U0.txt (1.3 KB, 37 views)
bigphil likes this.
basecase is offline   Reply With Quote

Old   February 6, 2025, 11:07
Default
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,102
Rep Power: 35
bigphil will become famous soon enoughbigphil will become famous soon enough
I was also confused by this example.

I figured it out (with some help of my trusty LLM friend):

From PolynomialEntry.H, the header says:
Quote:
PolynomialEntry container data entry for scalars. Items are stored in a
list of Tuple2's. Data is input in the form,
e.g. for an entry \<entryName\> that describes y = x^2 + 2x^3

Inline specification:
\verbatim
<entryName> polynomial
(
(1 2)
(2 3)
);
\endverbatim
For the pitzDaly inlet geometry, we can figure out that a parabola with a maximum velocity of 1 m/s has the equation Ux = - 6200 y^2 + 1, assuming y = 0 at the centre of the channel.

So, in this case, the entry is
Code:
profile polynomial
(
    ((1 0 0)        (0 0 0))  // Coefficient for x^0 = 1 (constant term)
    ((-6200 0 0)    (2 0 0))  // Coefficient for x^2 = -6200
);
dlahaye likes this.

Last edited by bigphil; February 6, 2025 at 11:23. Reason: add "+ 1" to the equation
bigphil is offline   Reply With Quote

Reply

Tags
boundary condition, fixedprofile, openfoam, polynomial bc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Cyclic boundary condition in foam-extend 4.0 rellumeister OpenFOAM Pre-Processing 2 March 3, 2020 09:03
Constant mass flow rate boundary condition sahm OpenFOAM 0 June 20, 2018 23:45
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 18:38
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 09:44
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28


All times are GMT -4. The time now is 15:47.