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

OscillatingFixedValue in OpenFOAM 141dev

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2009, 01:06
Default Hi All, I am trying t
  #21
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Hi All,




I am trying to incorporate oscillating fixed value boundary condition in my code for a simple rectangular geometry... I want to incorporate boundary condition given as A * sin (wt)..

I did try to implement Oscillating Fixed
value... I wanted to add A*sin(wt) as my boundary condition for my Phi variable ..

All I did was I changed the oscillatingFixedValue.C file which had
1+Asin(wt) to Asin(wt) and gave wmake libso in the
/openfoam/openFOAM-1.5/src/finitevolume directory
then gave wmake to my solver... But I
didn't see any change in the internalfield values for my Phi when I
changed condition from 1+Asin(wt) to Asin(wt)... Further I tried to
incorporate these oscillatingfixedvalue.C and .H files in my solver
folder directly and gave wmake but I got the following error



vishal@vishal-laptop:~/OpenFOAM/vishal-1.5/run/PNP_working_code_500_by_30nm_geometry_5V_transient/co upledFoam$
wmake
SOURCE=oscillatingFixedValueFvPatchField.C ; g++ -m32 -Dlinux -DDP
-Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter
-Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40
-I/home/vishal/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude
-IlnInclude -I.
-I/home/vishal/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude
-I/home/vishal/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude
-fPIC -pthread -c $SOURCE -o
Make/linuxGccDPOpt/oscillatingFixedValueFvPatchField.o
oscillatingFixedValueFvPatchField.C:38: error: redefinition of
'Foam::scalar Foam::oscillatingFixedValueFvPatchField<type>::cur rentScale()
const'
oscillatingFixedValueFvPatchField.C:38: error: 'Foam::scalar
Foam::oscillatingFixedValueFvPatchField<type>::cur rentScale() const'
previously declared here
oscillatingFixedValueFvPatchField.C:53: error: redefinition of
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::fvPatch&, const Foam::DimensionedField<type,>&)'
oscillatingFixedValueFvPatchField.C:53: error:
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::fvPatch&, const Foam::DimensionedField<type,>&)'
previously declared here
oscillatingFixedValueFvPatchField.C:70: error: redefinition of
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::oscillatingFixedValueFvPatchField<type>&, const Foam::fvPatch&,
const Foam::DimensionedField<type,>&, const
Foam::fvPatchFieldMapper&)'
oscillatingFixedValueFvPatchField.C:70: error:
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::oscillatingFixedValueFvPatchField<type>&, const Foam::fvPatch&,
const Foam::DimensionedField<type,>&, const
Foam::fvPatchFieldMapper&)' previously declared here
oscillatingFixedValueFvPatchField.C:86: error: redefinition of
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::fvPatch&, const Foam::DimensionedField<type,>&,
const Foam::dictionary&)'
oscillatingFixedValueFvPatchField.C:86: error:
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::fvPatch&, const Foam::DimensionedField<type,>&,
const Foam::dictionary&)' previously declared here
oscillatingFixedValueFvPatchField.C:112: error: redefinition of
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::oscillatingFixedValueFvPatchField<type>&)'
oscillatingFixedValueFvPatchField.C:112: error:
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::oscillatingFixedValueFvPatchField<type>&)' previously declared
here
oscillatingFixedValueFvPatchField.C:127: error: redefinition of
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::oscillatingFixedValueFvPatchField<type>&, const
Foam::DimensionedField<type,>&)'
oscillatingFixedValueFvPatchField.C:127: error:
'Foam::oscillatingFixedValueFvPatchField<type>::os cillatingFixedValueFvPatchFi eld(const
Foam::oscillatingFixedValueFvPatchField<type>&, const
Foam::DimensionedField<type,>&)' previously declared
here
oscillatingFixedValueFvPatchField.C:143: error: redefinition of 'void
Foam::oscillatingFixedValueFvPatchField<type>::aut oMap(const
Foam::fvPatchFieldMapper&)'
oscillatingFixedValueFvPatchField.C:143: error: 'virtual void
Foam::oscillatingFixedValueFvPatchField<type>::aut oMap(const
Foam::fvPatchFieldMapper&)' previously declared here
oscillatingFixedValueFvPatchField.C:155: error: redefinition of 'void
Foam::oscillatingFixedValueFvPatchField<type>::rma p(const
Foam::fvPatchField<type>&, const Foam::labelList&)'
oscillatingFixedValueFvPatchField.C:155: error: 'virtual void
Foam::oscillatingFixedValueFvPatchField<type>::rma p(const
Foam::fvPatchField<type>&, const Foam::labelList&)' previously
declared here
oscillatingFixedValueFvPatchField.C:167: error: redefinition of 'void
Foam::oscillatingFixedValueFvPatchField<type>::upd ateCoeffs()'
oscillatingFixedValueFvPatchField.C:167: error: 'virtual void
Foam::oscillatingFixedValueFvPatchField<type>::upd ateCoeffs()'
previously declared here
oscillatingFixedValueFvPatchField.C:188: error: redefinition of 'void
Foam::oscillatingFixedValueFvPatchField<type>::wri te(Foam:stream&)
const'
oscillatingFixedValueFvPatchField.C:188: error: 'virtual void
Foam::oscillatingFixedValueFvPatchField<type>::wri te(Foam:stream&)
const' previously declared here
make: *** [Make/linuxGccDPOpt/oscillatingFixedValueFvPatchField.o] Error 1
I am also attaching the oscillatingfixedvalues files along with my phi
boundary condition file.. Kindly have a look at them and give your suggestions..Kindly let me know how to proceed further.

Thanks

Regards

Vishal
nandiganavishal is offline   Reply With Quote

Old   March 10, 2009, 01:27
Default http://www.cfd-online.com/Ope
  #22
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
oscillatingFixedValueFvPatchField.C
oscillatingFixedValueFvPatchField.H
Phi
nandiganavishal is offline   Reply With Quote

Old   April 8, 2009, 13:18
Default
  #23
New Member
 
Andreas Feymark
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 18
Rep Power: 17
feymark is on a distinguished road
Hi Hrv,

You asked for a preference. I think that most people would prefer something like,

return refValue + amplitude*sin(2*pi*frequency*t);

You could of course compile your own local version. But it's much more convenient to have it in a logical way from the beginning.

Keep up the good work!

/Feymark
feymark is offline   Reply With Quote

Old   April 28, 2009, 20:52
Default High Mean Drag Using oscillatingFixedValue in 1.4.1-dev
  #24
New Member
 
Saman
Join Date: Apr 2009
Posts: 1
Rep Power: 0
samanalafi is on a distinguished road
Hi every body,
I have done the corrections recommended in this thread to get an oscillationg cylinder motion and solve it with icoDyMFoam solver. I changed
both files in :
OpenFoam-1.4.1-dev/src/OpenFOAM/PointPatchFields/derived/oscillatingFixedValue/oscillatingFixedValuePointPatchField.C
and them ./Allwmake in src/tetDocompositionFiniteElement
OpenFOAM.1.4.1-dev/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C and then wmake libso in src/FiniteVolume.
When I move the mesh by moveDynamicMesh the mesh seems to move ok .
My goal is to obtain the results of Frank Bos for a plunging cylinder at Re = 185 which has the mean drag coefficient around 1.2.
Basically I want y = -Asin(2*pi*f*t) for my cylinder. So I changed the lines in the mentioned files to V = -A*2*pi*f*cos(2*pi*f*t) and then compiled. My settings like motionU, BCs, fvSolution, dynamicMeshDict, ... is exactly the same as those of Frank but I get mean drag coefficient equal to 1.7 which is 40% of.
Please let me know your suggesstions because what ever is recommended in the forum I have done. I will post the case if any body is willing to take a look.
Thanks so much
samanalafi is offline   Reply With Quote

Old   August 11, 2015, 09:37
Default
  #25
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Helle everyone,

I would like to use oscillatingFixedValue in Foam ext. 3.1
In my case I habe a channel with one foil in it. At the inlet the fluid should oscillate, but at the moment it doesn't. I use the following BC for the inlet:

{
type oscillatingFixedValue;
refValue uniform (1.56 0 0);
// offset
amplitude 0.0577;
frequency 0.8367;
value uniform (1.56 0 0);
}
The velocity should be 1.56, amplitude and frequency are clear. Might anyone explain my what value, refvalue and offset mean? Or are there any other BC for such an oscillating velocity?

Thank you for anyones' help,

best regards,
Stephie
stephie is offline   Reply With Quote

Old   May 29, 2016, 01:06
Default
  #26
New Member
 
Join Date: Apr 2016
Posts: 3
Rep Power: 10
IonCoolT is on a distinguished road
Hi Stephanie!

I have the same doubt as you...

Do you already know what are refvalue and offset?

Cheers

Ion
IonCoolT is offline   Reply With Quote

Old   June 7, 2016, 08:32
Default
  #27
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Dear Ion,

in the end I didn't use offset and refvalue. I changed in the dynamicMeshDict:

so lidBodyMotionFunction o s c i l l a t i n g R o t a t i n g M o t i o n ;
oscillatingRotatingMotionCoeffs
{
origin
(0.05 0 0);
amplitude
( 0 0 3 0 ) ; // i n Grad
omega
3 0 1 . 2 1 2 ; // rad / s
}

The reason why it didn't move, was that I expected the amplitude is a value - but it was an angle.
I am sorry, but I can't remember what offset and refvalue mean.

I hope this will help you.
best regards,
Stephie
stephie is offline   Reply With Quote

Old   July 7, 2016, 00:24
Default
  #28
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by stephie View Post
Dear Ion,

in the end I didn't use offset and refvalue. I changed in the dynamicMeshDict:

so lidBodyMotionFunction o s c i l l a t i n g R o t a t i n g M o t i o n ;
oscillatingRotatingMotionCoeffs
{
origin
(0.05 0 0);
amplitude
( 0 0 3 0 ) ; // i n Grad
omega
3 0 1 . 2 1 2 ; // rad / s
}

The reason why it didn't move, was that I expected the amplitude is a value - but it was an angle.
I am sorry, but I can't remember what offset and refvalue mean.

I hope this will help you.
best regards,
Stephie
Hi Stephie:
I have built my oscillation flow, and In the model, the Vof method was included. When silmulation begin, the volume of fluid will decrease gradually, I thought it was the problem of outlet boundary. I have test the condition of inletOutlet and zeroGradient. But they didn't work. so I want to know which boundary condition used in your model.

Best regards
Fan Fei
Fanfei 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
Piston motion with time varying experimental data oscillatingFixedValue eno OpenFOAM Running, Solving & CFD 3 March 19, 2009 11:06
Piston motion with time varying experimental data oscillatingFixedValue eno OpenFOAM Running, Solving & CFD 0 March 12, 2009 18:31
OscillatingFixedValue in OpenFOAM 141dev mathieu OpenFOAM Bugs 0 September 9, 2008 18:50
141dev svn repository egp OpenFOAM Installation 1 August 25, 2008 17:10
SonicFoam 141dev changes what do they mean mike_jaworski OpenFOAM Running, Solving & CFD 0 December 30, 2007 16:55


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