|
[Sponsors] |
September 25, 2018, 02:55 |
codedFixedValue not working
|
#1 |
New Member
Join Date: Mar 2018
Posts: 16
Rep Power: 8 |
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 |
|
|
|
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 |