|
[Sponsors] |
Is there any provision for sinusoidal velocity inlet b.c in openFoam 4.1? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 3, 2017, 10:19 |
Is there any provision for sinusoidal velocity inlet b.c in openFoam 4.1?
|
#1 |
New Member
Vivekananda
Join Date: May 2017
Location: Cardiff, UK
Posts: 27
Rep Power: 9 |
Hello,
I am trying to incorporate a sinusoidal velocity profile at the inlet boundary. recently I came across the "oscillatingFixedValue" bc in a tutorial. but I am unable to find this bc in the derived bc in the finite volume patch fields. I have done my further research and came to know that OF v 4.1 does not have this bc. Is friends there any way to have this sinusoidal velocity inlet in OF 4.1? regards vivek |
|
May 3, 2017, 17:58 |
|
#2 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
Use a boundary condition with Function1. Example:
{ type uniformFixedValue; uniformValue constant 0.2; } Instead of constant you can use polynomial or sinus, a table file etc... |
|
May 3, 2017, 18:12 |
|
#3 |
New Member
Vivekananda
Join Date: May 2017
Location: Cardiff, UK
Posts: 27
Rep Power: 9 |
thanku sir for your kind reply. In my case I hve to use a velocity profile which has the following expression: U=a*f*Cos( 2*Pi*a*f*t).
Here, a=amplitude;f=frequency; and t=time; In this case how should I specify my amplitude , frequency and time? please give me some advice.. regards vivek |
|
May 4, 2017, 17:57 |
|
#4 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
Function1 is located here:
https://github.com/OpenFOAM/OpenFOAM...ions/Function1 Inside sine.h you'll find: Code:
Templated sine function with support for an offset level. \f[ a sin(2 \pi f (t - t_0)) s + l \f] where \vartable symbol | Description | Data type a | Amplitude | Function1<scalar> f | Frequency [1/s] | Function1<scalar> s | Type scale factor | Function1<Type> l | Type offset level | Function1<Type> t_0 | Start time [s] | scalar t | Time [s] | scalar \endvartable Example for a scalar: \verbatim <entryName> sine; <entryName>Coeffs { frequency 10; amplitude 0.1; scale 2e-6; level 2e-6; } \endverbatim Example for a vector: \verbatim <entryName> sine; <entryName>Coeffs { frequency 10; amplitude 1; scale (1 0.1 0); level (10 1 0); } \endverbatim SourceFiles Sine.C https://github.com/OpenFOAM/OpenFOAM...hVectorField.H Simply check which boundary conditions contain function1. It should be loaded at the top of the .h file. Most boundary conditions can be found here: https://github.com/OpenFOAM/OpenFOAM...Fields/derived I have not tested this, but this should work with minor tweaking: Code:
inlet { type uniformFixedValue; uniformValue sine; uniformValueCoeffs { frequency 10; amplitude 1; scale (1 0 0); level (0 0 0); // offset t0 0; // shift this for a Cosinus } } Code:
amplitude_->value(t) *sin(constant::mathematical::twoPi*frequency_->value(t)*(t - t0_)) *scale_->value(t) + level_->value(t); |
|
May 5, 2017, 01:00 |
|
#5 |
New Member
Vivekananda
Join Date: May 2017
Location: Cardiff, UK
Posts: 27
Rep Power: 9 |
thank you sir...yesterday i generated a sinusoidal inlet profile with uniformfixedvalue. Its coming nice. but sir I have some doubts. I have tried to find out what an offset is. It is defined as the vertical distance of the base line. and in the syntaxes, it is written as (10 1 0). What these three value stand for? similar doubt for scale as well. scale is a factor by which the signal is amplified. but what are these three values in the syntax of scale? and sir I also did not understand the "t0 0 ; // shift this for cosinus" line.Please explain
regards vivek |
|
May 5, 2017, 03:26 |
|
#6 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
As I have already shown the formula is:
Code:
scale*amplitude*sin(2*Pi*frequency*(t - t0)) + level Example: Code:
(1 0 0)^T*amplitude*sin(2*Pi*frequency*(t - t0)) + (0 1 0)^T Now you want U=a*f*Cos( 2*Pi*a*f*t). Hence level is (0 0 0). Since amplitude is also inside your cos set it to 1 and use the amplitude inside scale. If your inlet is in x direction you should format your values in this fashion: Code:
inlet { type uniformFixedValue; uniformValue sine; uniformValueCoeffs { frequency a*f; amplitude 1; scale (a*f 0 0); level (0 0 0); // offset t0 0.25/(a*f); // shift this for a Cosinus } } |
|
April 3, 2019, 06:25 |
|
#7 |
Senior Member
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 13 |
I think t0 = -0.25/(a*f) because:
2pi*a*f*(t-t0) = pi/2 + 2pi*a*f*t => t0 = -0.25/(a*f) based on sin(pi/2 + x) = cos (x) |
|
May 1, 2019, 09:13 |
Sinusoidal wave input in interDyMFoam model
|
#8 |
New Member
Daan
Join Date: Feb 2019
Posts: 4
Rep Power: 7 |
hey,
I am trying to create a multiphase model of a floating object which is subjected to a sinusoidal wave input. Would anybody be able to explain to me how I can achieve this? I have tried using a 'uniformFixedValue' inlet with a sine as 'uniformValue', but I can't get it to work properly. (I get very weird waves if any at all.) Any directions on how to set up the boundary conditions would be much appreciated! Kind regards, Daan |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure problems with inlet variable velocity | jaimesdiegop | CFX | 2 | September 1, 2016 03:31 |
flow around a circular cylinder with velocity inlet and outflow outlet | shuoxue | OpenFOAM | 1 | March 3, 2014 11:42 |
velocity inlet and ideal gas simultaneously-what's wrong? | preetam69 | FLUENT | 0 | September 28, 2013 05:51 |
Inlet Velocity in CFX | aeroman | CFX | 12 | August 6, 2009 19:42 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |