CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

codedFixedValue not working

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2018, 02:55
Default codedFixedValue not working
  #1
New Member
 
Join Date: Mar 2018
Posts: 16
Rep Power: 8
zizou1 is on a distinguished road
Hello!
I wrote a parabolic inlet profile for a pipe in cylindrical coordinates with codedFixedValue: i really don't know why but the result at the inlet seems to be like a sinusoidal.
This is U:

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{


inlet
{
type codedFixedValue;
value $internalField;
redirectType velocityProfile;

code
#{
scalar nu=0.86;
scalar dp=-20;
scalar r1=0.494974746830583;

fixedValueFvPatchVectorField myPatch(*this);
forAll(this->patch().Cf(),i)
{
myPatch[i]=vector(0,0,((-1/nu)*(dp)*(((r1*r1)-((Foam:ow(this->patch().Cf()[i].x(), 2)) + (Foam:ow(this->patch().Cf()[i].y(), 2)))) )) );
}
operator==(myPatch);
#};

}

outlet
{
type zeroGradient;

}

"(walls|bfV_zone0)"
{
type fixedValue;
value uniform (0 0 0);
}
}

Can anyone help me with this?
I attach an image of the inlet in paraview.
Thanks
Attached Images
File Type: jpg inlet U.jpg (44.9 KB, 14 views)
zizou1 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
codedFixedValue: accessing other patch causes crash in parallel RL-S OpenFOAM Running, Solving & CFD 2 December 24, 2019 21:20
codedFIxedValue, writing only to Z-Component of an Inletpatch fanta OpenFOAM Programming & Development 3 May 24, 2018 10:28
findCell() in parallel: not working if location is outside the domain TobiWol OpenFOAM 0 January 10, 2018 14:33
Processor 0 not working vishwesh OpenFOAM Running, Solving & CFD 0 November 17, 2017 03:35
DPM parallel is not working but serial is working johnwinter FLUENT 1 March 27, 2012 02:01


All times are GMT -4. The time now is 02:26.