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

Enforcing symmetric fields about a plane

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2021, 23:55
Default Enforcing symmetric fields about a plane
  #1
New Member
 
simFoamer
Join Date: Jan 2017
Posts: 1
Rep Power: 0
prka0002 is on a distinguished road
Can setExprFields be used to enforce symmetric field about a plane? What is required is mentioned in the dict File below.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      setExprFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

expressions
(
    U
    {
        field       U;
        dimensions  [0 1 -1 0 0 0 0];

//        constants
//        {
//        }

        variables
        (
         //
        );

        condition
        #{
           (pos().y() < 0)
        #};

        expression
        #{
            vector
            (
             //To Do: mirror of velocity fields at pos().y()>0 to enforce symmetry through whole domain. Mesh is a 2D rectangular domain which has reflectional symmetry about y=0. (x-horizontal axis, y-vertical) 
             // simulation of half domain and implementation of reflect filter in paraview works however, what is required is a code for enforcing symmetry at every time step by reflecting field values 
             //of top half of domain to bottom half. setExprFields here is to figure this problem out (if that works) and take it as a reference which can be added to the code itself later. 
            )
        #};
    }
);

// ************************************************************************* //
Any solution ideas to this problem works, doesn't have to be setExprFields only. This is just a reference. Thank you in advance!
prka0002 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
[Commercial meshers] faceSet of a cutting plane for a internal patch definition RubenGutiii OpenFOAM Meshing & Mesh Conversion 1 April 17, 2019 05:10
Channel flow with symmetry Plane not symmetric Hillie OpenFOAM Running, Solving & CFD 0 May 19, 2017 22:32
[DesignModeler] Body is not symmetric about xz plane, how to make that? sifet ANSYS Meshing & Geometry 5 August 31, 2015 04:05
Computation of Turbulence Intensity Profile from PIV vector fields emspinosa Visualization & Post-Processing 0 October 24, 2014 07:00
multiphaseEulerFoam: efficient way of implementing fields for all phases maybee OpenFOAM Programming & Development 0 January 23, 2014 04:16


All times are GMT -4. The time now is 13:36.