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

trying to understand the boundary condition "oscillatingFixedValue"

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2015, 00:20
Default trying to understand the boundary condition "oscillatingFixedValue"
  #1
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
Hi foamer,

I would like to setup oscillatingFixedValue with the equation

u = 2.7 + 16(sėn2pit/16)

I saw the guide at

https://openfoamwiki.net/index.php/M...tingFixedValue

if I understand exactly, the inlet velocity will:
inlet
{
type oscillatingFixedValue;
value uniform 0; // Initialization value
refValue uniform (1 0 0); // Reference value for oscillation
offset (1.7 0 0); // Oscillation mean value offset
amplitude constant 16; // Amplitude of oscillation
frequency constant 0.0625; // frequency
}
Following the equation, I set offset 1.7 will it plus 1 to 2.7?


Thank you
Thanh

Last edited by hiuluom; May 29, 2015 at 12:09.
hiuluom is offline   Reply With Quote

Old   May 29, 2015, 23:38
Default
  #2
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
I ran inlet BCs above no problem with Tjunction tutorial. I only confuse about the "refValue" and "offset":
  1. The offset should be filled 2.7 or 1.7?
  2. If I want to reverse in x-direction, can I only add minus in refValue and offset? Will it exactly become: refValue uniform (-1 0 0); offset (-1.7 0 0)?
hiuluom is offline   Reply With Quote

Old   May 30, 2015, 08:05
Default
  #3
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
Does anyone can help me explain my question?
hiuluom is offline   Reply With Quote

Old   May 30, 2015, 08:34
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Thanh,

I don't understand what's the doubt you're having? I've checked the source code and the expression on the wiki seems to be correct:
\textrm{\textit{refV}} \cdot \left( 1.0 + \textrm{\textit{Amp}} \cdot \sin \left(2\pi\cdot \textrm{\textit{freq}}\cdot t\right)\right) + \textrm{\textit{offset}}
Therefore, it's a basic mathematical expression. If "refV" is set to 1.0, then you're left with this:
\left( 1.0 +\textrm{\textit{offset}} \right) + \textrm{\textit{Amp}}  \cdot \sin \left(2\pi\cdot \textrm{\textit{freq}}\cdot t\right)
The rest is simple math, namely for having a final offset of 2.7 (with refV =1), you need the "offset" parameter to be 1.7.

And when in doubt, don't be afraid to simulate with OpenFOAM and test things yourself. If you create a simple test case, you can easily test if this works as intended or not. Specifically, if you want to be able to prove that it works as intended, you should in fact do that simple test case first!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 30, 2015, 12:56
Default
  #5
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
Hi Bruno,

Your explaination is very clearly at refVal. I have simulated with Tjuntion tutorial with inlet Bcs above. I only confuse that offset should be 2.7 or 1.7.

Thank you so much.
hiuluom is offline   Reply With Quote

Old   July 25, 2015, 12:45
Default
  #6
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
I add more answer the oscillating. If the equation don't have offset:
Code:
U = 16(sėn2pit/16) (m/s)
So the result will wrong if equation was set follow equation describe above with refV=1, Amp =16, offset =0. Because the equation return

\textrm{\textit{refV}} \cdot \left( 1.0 + \textrm{\textit{Amp}} \cdot \sin \left(2\pi\cdot \textrm{\textit{freq}}\cdot t\right)\right) + \textrm{\textit{offset}}=1\cdot \left( 1.0 + \textrm{\textit{16}} \cdot \sin \left(2\pi\cdot \textrm{\textit{freq}}\cdot t\right)\right)

Code:
U = 1 + 16(sėn2pit/16) (m/s)
Therefore, I think the amplitude always equal to 1. In other hand, refV =16 and offset =-16 as the equation become:

\textrm{\textit{refV}} \cdot \left( 1.0 + \textrm{\textit{Amp}} \cdot \sin \left(2\pi\cdot \textrm{\textit{freq}}\cdot t\right)\right) + \textrm{\textit{offset}}=16\cdot \left( 1.0 + \textrm{\textit{1}} \cdot \sin \left(2\pi\cdot \textrm{\textit{freq}}\cdot t\right)\right) - \textrm{\textit{16}}
Code:
16 +16(sėn2pit/16) - 16 = 16(sėn2pit/16)
That's it.
hiuluom is offline   Reply With Quote

Old   July 25, 2015, 13:12
Default
  #7
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
ssss is on a distinguished road
Use groovyBC for the BC, it is easier
ssss is offline   Reply With Quote

Old   August 17, 2015, 03:58
Default
  #8
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hello everyone,

I am not sure if this is the right place to asked, but maybe one of you might help me. In my case I have an airfoil in a channel. Now my task is to implement a condition for an oscillating stream. I thought I might use oscillatingFixedValue for it.

I tried for my inlet condition under 0/U:

type oscillatingFixedValue;
refValue (1.56 0 0); //my verlocity
amplitude 0.05;
offset 0;
frequency 0.8;
value uniform (0 0 0)

When I have a look in to the vectorplot I can't see any movement of the vectors, so I think it doesn't work.
Have anyone a hint for me how I can fix my problem?

I would be very gratefule!

Thank you and best regards,
Stephie
stephie is offline   Reply With Quote

Old   August 17, 2015, 08:17
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by stephie View Post
Have anyone a hint for me how I can fix my problem?
Quick answer: Sorry, but you're being too vague in order to give an accurate answer. The best I can say is that you should compare with the plot of the oscillation you're requesting: Plot[0. + 1.56 (1. + 0.05 Sin[2*pi*0.8* t]), {t, 0, 10}]
And/or that perhaps you're not familiar enough yet with the time controls in ParaView?

Beyond this, I suggest:
I say this because you did not specify what settings you have in "controlDict" and if you're solving in transient or steady state.
wyldckat 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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Outflow boundary condition in cartesian grid SIMPLE velocity-pressure coupling ghobold Main CFD Forum 9 September 19, 2015 02:50
Accessing multiple boundary patches from a custom boundary condition file ripudaman OpenFOAM Programming & Development 0 October 22, 2014 18:34
Radiation interface hinca CFX 15 January 26, 2014 17:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44


All times are GMT -4. The time now is 18:48.