CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   timeVaryingUniformFixedValue (https://www.cfd-online.com/Forums/openfoam/73571-timevaryinguniformfixedvalue.html)

andrea.pasquali March 11, 2010 09:53

timeVaryingRotatingWallVelocity
 
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 March 11, 2010 11:57

timeVarying for rotatingWallVelocity
 
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

idrama March 11, 2010 13:47

Check that out: http://albertopassalacqua.com/?p=69

alberto March 11, 2010 14:05

Quote:

Originally Posted by andrea.pasquali (Post 249570)
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,

andrea.pasquali March 11, 2010 14:43

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

alberto March 11, 2010 14:50

Quote:

Originally Posted by andrea.pasquali (Post 249593)
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!

andrea.pasquali March 12, 2010 14:42

2 Attachment(s)
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

andrea.pasquali March 15, 2010 04:55

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 March 15, 2010 09:41

2 Attachment(s)
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

alberto March 15, 2010 11:14

Quote:

Originally Posted by andrea.pasquali (Post 250045)
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,

andrea.pasquali March 21, 2010 03:07

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 March 27, 2010 04:01

timeVaryingRotatingWallVelocity
 
2 Attachment(s)
Hello,
Finally I compiled the new BC ''timeVaryingRotatingWallVelocity".
I attached below the files.

Regards

Andrea

arvind_arya April 2, 2010 22:31

timeVaryingRotatingWallVelocity.....
 
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

andrea.pasquali April 5, 2010 14:23

3 Attachment(s)
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
http://www.cfd-online.com/Forums/ope...interfoam.html

Good luck!

Andrea

arvind_arya April 6, 2010 12:28

Thank You very much.....Andrea

jml October 1, 2010 07:18

timeVaryingUniformFixedValue outOfBounds
 
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

idrama October 1, 2010 10:02

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

jml October 7, 2010 05:40

Thank you Idrama. I have tried it and you are right.

Thanks

JonW October 22, 2012 07:30

timeVaryingRotatingWallVelocityFvPatchVectorField for OF 2.1.1
 
2 Attachment(s)
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


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