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

timeVaryingUniformFixedValue

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

Like Tree1Likes
  • 1 Post By alberto

Reply
 
LinkBack Thread Tools Display Modes
Old   March 11, 2010, 09:53
Default timeVaryingRotatingWallVelocity
  #1
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hi everybody,
I saw in Forum there is a BC type to run a simulation with a condition time varying.
What I need is a ramp.
Quote:
type timeVaryingUniformFixedValue;
fileName ramp.dat;
outOfBounds clamp;
Could anyone explain me how to write the file ramp.dat? (header, columns, spacing)
What is it the "outOfBounds clamp;"?
Is there an example in tutorials

Thanks

Andrea
__________________
Andrea Pasquali

Last edited by andrea.pasquali; March 27, 2010 at 03:58. Reason: New BC time depending
andrea.pasquali is online now   Reply With Quote

Old   March 11, 2010, 11:57
Default timeVarying for rotatingWallVelocity
  #2
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Another problem,
with "timeVaryingUniformFixedValue" I can set a normal velocity to surface of the patch, is it right?
Does a BC type exsist to set a parallel velocity to the surface of the patch, like "rotatingWallVelocity"?
Does "timeVaryingRotatingWallVelocity" exist? Or does it need to be compile?

Thanks

Andrea
__________________
Andrea Pasquali
andrea.pasquali is online now   Reply With Quote

Old   March 11, 2010, 13:47
Default
  #3
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 9
idrama is on a distinguished road
Check that out: http://albertopassalacqua.com/?p=69
idrama is offline   Reply With Quote

Old   March 11, 2010, 14:05
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by andrea.pasquali View Post
Another problem,
with "timeVaryingUniformFixedValue" I can set a normal velocity to surface of the patch, is it right?
In fixedValue type conditions for vectors you specify the components of the vector. In other words you specify the magnitude, direction and verse, and the vector is not necessarily along the surface normal. For that you need to use something like surfaceNormalFixedValue, which, however, does not change in time.

Quote:
Does a BC type exsist to set a parallel velocity to the surface of the patch, like "rotatingWallVelocity"?
Does "timeVaryingRotatingWallVelocity" exist? Or does it need to be compile?
It does not exist. You have to write it modifying the code.

You find the list of derived BC's in this folder:

.../src/finiteVolume/fields/fvPatchFields/derived

Best,
sharonyue likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 11, 2010, 14:43
Default
  #5
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Thank you very much!
Ciao Alberto,
I'd like to write the code to obtain "timeVaryingRotatingWallVelocity" but I don't know C++ languange code... so I'm thinking to:
1) See difference between "timeVaryingUniformFixedValue" and "fixedValue"
2) Copy the difference in "rotatingWallVelocity" code
What do you think?
Could you suggest me any advice?

Thanks
__________________
Andrea Pasquali
andrea.pasquali is online now   Reply With Quote

Old   March 11, 2010, 14:50
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by andrea.pasquali View Post
Thank you very much!
Ciao Alberto,
I'd like to write the code to obtain "timeVaryingRotatingWallVelocity" but I don't know C++ languange code...
OK, but you should start learning C++ if you want to use OpenFOAM without wasting a lot of time, especially if you need to customize it.

Quote:
1) See difference between "timeVaryingUniformFixedValue" and "fixedValue"
2) Copy the difference in "rotatingWallVelocity" code
What do you think?
Both the conditions are based on the same base BC (uniformFixedValue), so it should not be too complicated to merge them.

Ask if you meet any difficulty

Good luck!
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 12, 2010, 14:42
Default
  #7
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hi Alberto,
I wrote the .C and .H files for "timeVaryingRotatingWallVelocity" BC type.
I attached the files.
I think the .H file is correct (I hope!), I'm not sure for the .C file in "Member Functions".
Tomorrow I'll try to compile it (is the command "wmakelibso", right?)
Could you have a look to the files?

Thank you very much
Attached Files
File Type: c timeVaryingRotatingWallVelocity.C (5.4 KB, 19 views)
File Type: h timeVaryingRotatingWallVelocity.H (6.6 KB, 12 views)
__________________
Andrea Pasquali
andrea.pasquali is online now   Reply With Quote

Old   March 15, 2010, 04:55
Default
  #8
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hi,
I compiled the new "timeVaryingRotatingWallVelocity".
My BC is (in U file):
Quote:
ruota
{
type timeVaryingRotatingWallVelocity;
origin (-25e-3 1.42e-5 374e-3);
axis (0 0 -1);
//omega 60;
fileName "ramp";
outOfBounds clamp;
}
My ramp file is:
Quote:
(
(0 0)
(1 60)
)
When I run the interFoam I obtain the error:
Quote:
--> FOAM FATAL IO ERROR:

Cannot find 'value' entry on patch ruota1 of field U in file "/mnt/Raid/scratch/CFD/prova/dueRuote/interFoam4_newBC/0/U"
which is required to set the values of the generic patch field.
(Actual type timeVaryingRotatingWallVelocity)

Please add the 'value' entry to the write function of the user-defined boundary-condition
or link the boundary-condition into libfoamUtil.so

file: /mnt/Raid/scratch/CFD/prova/dueRuote/interFoam4_newBC/0/U::boundaryField::ruota1 from line 41 to line 46.

From function genericFvPatchField<Type>::genericFvPatchField(con st fvPatch&, const Field<Type>&, const dictionary&)
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 72.

FOAM exiting
Why OpenFOAM can't find value in "ramp"?
Where I'm wronging? Are the .H and .C not correct?

Thanks
__________________
Andrea Pasquali
andrea.pasquali is online now   Reply With Quote

Old   March 15, 2010, 09:41
Default
  #9
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hi,
I made some modify to my .H and .C files. I attached the new files.
I compiled but when I run interFoam I obtain the same error...

Thanks for any help
Attached Files
File Type: c timeVaryingRotatingWallVelocity.C (5.6 KB, 12 views)
File Type: h timeVaryingRotatingWallVelocity.H (6.7 KB, 3 views)
__________________
Andrea Pasquali
andrea.pasquali is online now   Reply With Quote

Old   March 15, 2010, 11:14
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by andrea.pasquali View Post
Hi,
I made some modify to my .H and .C files. I attached the new files.
I compiled but when I run interFoam I obtain the same error...

Thanks for any help
Sorry, I still have to look at the code. However, what is missing is a "value" entry in the BC setup. Even if not used, it has to be specified.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 21, 2010, 03:07
Default
  #11
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hi,
I still haven't found a solution for my problem...
In "rotatingWallVelocity" there are 3 value (origin, axis, omega).
In my "timeVaryingRotatingWallVelocity" I put "timeSeries" instead of "omega", without changing "origin" and "axis".
The "timeSeries" is into file "ramp".
Maybe is it better if I put all value, origin axis timeSeries, into "ramp" file?

Thanks for any help

Andrea
__________________
Andrea Pasquali
andrea.pasquali is online now   Reply With Quote

Old   March 27, 2010, 04:01
Default timeVaryingRotatingWallVelocity
  #12
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hello,
Finally I compiled the new BC ''timeVaryingRotatingWallVelocity".
I attached below the files.

Regards

Andrea
__________________
Andrea Pasquali
andrea.pasquali is online now   Reply With Quote

Old   April 2, 2010, 22:31
Default timeVaryingRotatingWallVelocity.....
  #13
New Member
 
Arvind
Join Date: Mar 2009
Posts: 13
Rep Power: 8
arvind_arya is on a distinguished road
Hi Andrea;
I am also trying to use same type of boundary condition ( timeVaryingRotatingWallVelocity) as u have compiled.Please can you share (upload) your working BC in U file and ramp file as an example.It will be very helpful in my work..thanks

Regards
Arvind
arvind_arya is offline   Reply With Quote

Old   April 5, 2010, 14:23
Default
  #14
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hi Arvind,
I attached my U and ramp files. I hope could be useful to you!
I'm trying this BC with interFoam but i have problems how I posted in
interFoam

Good luck!

Andrea
Attached Files
File Type: txt ramp1.txt (28 Bytes, 59 views)
File Type: txt ramp2.txt (25 Bytes, 26 views)
File Type: txt U.txt (2.9 KB, 49 views)
__________________
Andrea Pasquali
andrea.pasquali is online now   Reply With Quote

Old   April 6, 2010, 12:28
Default
  #15
New Member
 
Arvind
Join Date: Mar 2009
Posts: 13
Rep Power: 8
arvind_arya is on a distinguished road
Thank You very much.....Andrea
arvind_arya is offline   Reply With Quote

Old   October 1, 2010, 07:18
Default timeVaryingUniformFixedValue outOfBounds
  #16
jml
New Member
 
Jml
Join Date: Mar 2009
Posts: 23
Rep Power: 8
jml is on a distinguished road
Hello,

I'm using "timeVaryingUniformFixedValue" boundary condition, and there is a parameter called "outOfBounds" which has different options: clamp, warn,repeat..

What are the differences between clamp,warn and repeat?

Thanks
jml is offline   Reply With Quote

Old   October 1, 2010, 10:02
Default
  #17
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 9
idrama is on a distinguished road
These parameter tells what to do when the leave the time range. For instance, when you simulation starting at 0 and you have a file with

(0 (1 0 0))
(1 (0.5 0 0 0))
(2 (0 0 0))

these entries. Assuming that you simulation goes to 5 then happens the following for:

Just imagine you would fit a linear function between the point, then what would you do outside the defined interval?

clamp: the velocity remains 0 after 2 seconds.

warn: the will get waring by leaving the range and probably the simulation carries on (never tired myself).

repeat: the file will be read from the beginning.

cheers
idrama is offline   Reply With Quote

Old   October 7, 2010, 05:40
Default
  #18
jml
New Member
 
Jml
Join Date: Mar 2009
Posts: 23
Rep Power: 8
jml is on a distinguished road
Thank you Idrama. I have tried it and you are right.

Thanks
jml is offline   Reply With Quote

Old   October 22, 2012, 07:30
Default timeVaryingRotatingWallVelocityFvPatchVectorField for OF 2.1.1
  #19
Member
 
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 53
Rep Power: 6
JonW is on a distinguished road
Hi there,
I have been trying to compile "timeVaryingRotatingWallVelocityFvPatchVectorField "
for OpenFOAM 2.1.1. The compilation work for OF 2.0.x without problem, but I am getting error in compilation for the 2.1.1.

I decided to take the 2.1.1 version of the "rotatingWallVelocityFvPatchVectorField.H, C" and do the same changes as originally done by Andrea Pasquali. The code compiles, but it does not work. That is, the solver is not getting the updated angular velocity (omega). I have tried to activate origin_, axis_ and using Up (which compiles), but still the solver is not getting the updated omega(t).

Here is the code, so far. Maybe someone can point out the error.

cheers
JonW
JonW is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 23:50.