CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

problem implementing parabolic profile in oscillatingFixedValue

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

Like Tree1Likes
  • 1 Post By gschaider

Reply
 
LinkBack Thread Tools Display Modes
Old   June 8, 2012, 17:06
Wink problem implementing parabolic profile in oscillatingFixedValue
  #1
Member
 
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 4
shash is on a distinguished road
Hi openfoamers ,

i was trying to create a parabolic velocity profile in oscillationFixedValue , as i require to generate v(y,t) where its parabolic in space and oscillating in time.i am new to openfoam ,just tried modifying the oscillatingfixedvalue code but its giving errors.can somebody suggest if my modifications r correct i hav attached my header and source.
[ATTACH][ATTACH]13684[/ATTACH][/ATTACH]
Attached Files
File Type: h newoscillatingFixedValueFvPatchField.H (5.7 KB, 11 views)
File Type: c newoscillatingFixedValueFvPatchField.C (5.2 KB, 7 views)
shash is offline   Reply With Quote

Old   June 9, 2012, 13:21
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,889
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by shash View Post
Hi openfoamers ,

i was trying to create a parabolic velocity profile in oscillationFixedValue , as i require to generate v(y,t) where its parabolic in space and oscillating in time.i am new to openfoam ,just tried modifying the oscillatingfixedvalue code but its giving errors.can somebody suggest if my modifications r correct i hav attached my header and source.
[ATTACH][ATTACH]13684[/ATTACH][/ATTACH]
if your main interest is getting the boundary condition and not learning C++ then you might be interested in groovyBC.

Or, if you don't want to install 3rd-party software, have a look at the coded-boundary condition. There you only have to program a small C++-code-snipplet that sets the boundary condition but not the whole bunch of constructors and other methods.

The advantage of both methods is that the definition is where it belongs: in the case and not some extra library.
shash likes this.
gschaider is offline   Reply With Quote

Old   June 10, 2012, 08:16
Default
  #3
Member
 
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 4
shash is on a distinguished road
hi gschaider,
i implemented the codedfixedvalue bc with:
inlet
{
type codedFixedValue;
value uniform (0 0 0); //$internalField;
redirectType awsum_bc;
code
#{
fixedValueFvPatchVectorField myPatch (*this);
forAll(myPatch, celli)
{
myPatch[celli] =(.1*(1-(this->patch().Cf()[celli](2)*this->patch().Cf()[celli](2)/.01))*(1 + sin(this->db().time().value())));
}
operator==(myPatch);
#};
}

but its giving errors, can you suggest what is wrong ,my velocity profile is v=v0(1+ sin(t)) ;v0 being parabolic f(y).
shash is offline   Reply With Quote

Old   June 10, 2012, 18:52
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,889
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by shash View Post
hi gschaider,
i implemented the codedfixedvalue bc with:
inlet
{
type codedFixedValue;
value uniform (0 0 0); //$internalField;
redirectType awsum_bc;
code
#{
fixedValueFvPatchVectorField myPatch (*this);
forAll(myPatch, celli)
{
myPatch[celli] =(.1*(1-(this->patch().Cf()[celli](2)*this->patch().Cf()[celli](2)/.01))*(1 + sin(this->db().time().value())));
}
operator==(myPatch);
#};
}

but its giving errors, can you suggest what is wrong ,my velocity profile is v=v0(1+ sin(t)) ;v0 being parabolic f(y).
Sorry. My time is limited. I support "my" stuff (groovyBC) but I don't do C++-lectures
gschaider is offline   Reply With Quote

Old   June 10, 2012, 19:06
Default
  #5
Member
 
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 4
shash is on a distinguished road
i already solved my problem , thank you for all ur help.
shash is offline   Reply With Quote

Old   December 14, 2012, 12:20
Default
  #6
Member
 
Vitor Vasconcelos
Join Date: Jan 2012
Posts: 33
Rep Power: 4
vitors is on a distinguished road
How shash? I'm interested in your solution.
vitors is offline   Reply With Quote

Old   June 11, 2013, 14:28
Default
  #7
Member
 
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 4
shash is on a distinguished road
hi vitor,

read this thread Getting errors on compiling boundary condition , sorry for such late reply.
shash is offline   Reply With Quote

Reply

Tags
oscillatingfixedvalue, parabolic inlet

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluent Profile Mass loss problem aras FLUENT 0 April 12, 2012 13:34
Volume Fraction, profile data problem cfxmar CFX 5 August 19, 2009 09:09
Problem implementing DETAILED REACTION MECHANISM Phil FLUENT 0 May 5, 2007 12:38
UDF velocity profile problem Steve FLUENT 0 January 18, 2005 13:11
VOF problem postprocessing display 3D flow profile Saturn FLUENT 4 July 14, 2004 01:58


All times are GMT -4. The time now is 09:05.