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

[swak4Foam] swak expressionField having troubles on mixingPlanes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2018, 09:45
Default swak expressionField having troubles on mixingPlanes
  #1
New Member
 
Marian
Join Date: Jul 2018
Posts: 2
Rep Power: 0
mjans is on a distinguished road
Hi,
im using swak to calculate the velocity in cylindar coordinates in runtime for further calculations.
Therefor I compared the swak-calculated values with the results using convertToCylindrical and realised, that on patches having an mixingplane as boundary condition these values are not the same .

I'm running the simulation with foam-ext 3.1 using swak4Foam-0.3.1.

Checking the values with ParaView 4.4 in the field showed, that the swak-values are everywhere conform to the ones calculated by convertToCylindrical except the ones on the mixingPlane patches.
(faceSets e.g. are ok (check faceSet INLETZONE_OUTLET_face e.g.)

Finally I wanted to check if the used cartesian velocity values cause the problem. Therefore I simply did no transformation (expression "U";) which produced swak-values identical to the common "U" values, even on the mixingPlane patches.

To calculate cylindrical velocity, I used the following function:

functions (
compute_VCyl
{
type expressionField;
fieldName VCyl;
dimension [0 1 -1 0 0 0 0];
variables (
"xVariable= pos().x;"
"yVariable= pos().y;"
"Polarwinkel= 0;"
"Polarwinkel=(xVariable>0)?atan(yVariable/xVariable):Polarwinkel;"
"Polarwinkel=(yVariable>=0&&xVariable<0)?pi+atan(y Variable/xVariable):Polarwinkel;"
"Polarwinkel=(yVariable<0&&xVariable<0)?-pi+atan(yVariable/xVariable):Polarwinkel;"
"Polarwinkel=(yVariable>0&&xVariable==0)?pi/2:Polarwinkel;"
"Polarwinkel=(yVariable<0&&xVariable==0)?-pi/2:Polarwinkel;"
"A= tensor(cos(Polarwinkel),sin(Polarwinkel),0,-sin(Polarwinkel),cos(Polarwinkel),0,0,0,1);"
);
expression "A&U";
autowrite true;
outputControl timeStep;
outputInterval 1;
}
);

libs ( "libOpenFoamTurbo.so" "libswakFunctionObjects.so" );

This is part of the controlDict in the small testcase "cylindrical", which shows the Problem. You can download it from

https://github.com/mjans/swak_mixingplane.git

There is also the case "cylindrical_ggi" where all mixingPlanes are replaced by ggi and the case "cylindrical_notrafo" writing the velocity U to V using the mentioned swak-function.

If anyone knows something about that or can help me with this, I'd be very happy.

Thanks
Marian
mjans is offline   Reply With Quote

Reply

Tags
cylindar coordinates, error, mixingplane, swak4foam


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
[swak4Foam] Using fieldAverage together with swak4foam expressionField tiam OpenFOAM Community Contributions 33 December 18, 2016 08:49
[swak4Foam] swakFoam - expressionField marluc OpenFOAM Community Contributions 1 April 22, 2015 13:50
Problems creating a volScalarField with expressionField function-object zfaraday OpenFOAM Running, Solving & CFD 2 January 12, 2015 08:49
[swak4Foam] expressionField aylalisa OpenFOAM Community Contributions 1 October 28, 2014 18:42
Some troubles about TestCases codezy SU2 2 March 26, 2014 05:10


All times are GMT -4. The time now is 04:43.