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

Sampling fields values passing through multiple windows

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 1, 2020, 11:14
Default Sampling fields values passing through multiple windows
  #1
New Member
 
Ben Simpson
Join Date: Dec 2019
Location: UK
Posts: 6
Rep Power: 2
b.simpson is on a distinguished road
Hi CFD Guru's,

I have a natural ventilation model of a building which currently has 20 open windows. For the ventilation metrics I need to find out the total contaminants (CO2), air velocity and temperature entering and leaving the building through the windows.

I am not sure what is the best/most efficient method of achieving this. Currently I have a surfaces file (see below) which provides a separate raw file for each field and each window. Is there a method which would allow me to sample the cells along a plane in the centre of the windows, which would provide a single file per field for all of the windows?

I am running the model in OpenFOAM-v1812 using the buoyantBoussinesqSimpleFoam solver.

Any help/advise on this topic would be very much appreciated.

Kind regards,
Ben

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

surfaces
{
    type            surfaces;
    libs            ("libsampling.so");
    writeControl    writeTime;

    surfaceFormat   raw;
    fields          (U T CO2);

    interpolationScheme cell;

    surfaces
    (
        Window1
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (0.85 0.175 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window2
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (3.85 0.175 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window3
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (6.85 0.175 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window4
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (9.85 0.175 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window5
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (12.85 0.175 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window6
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (0.85 0.175 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window7
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (3.85 0.175 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window8
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (6.85 0.175 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window9
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (9.85 0.175 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window10
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (12.85 0.175 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window11
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (0.85 15.55 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window12
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (3.85 15.55 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window13
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (6.85 15.55 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window14
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (9.85 15.55 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window15
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (12.85 15.55 2.2);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window16
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (0.85 15.55 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window17
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (3.85 15.55 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window18
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (6.85 15.55 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window19
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (9.85 15.55 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		Window20
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                point   (12.85 15.55 0.7);
                normal  (2 0 0.5);
            }
            interpolate     true;
        }
		
    );
}


// ************************************************************************* //
b.simpson is offline   Reply With Quote

Reply

Tags
buoyancy driven flow, natural ventilation, openfoam 1812

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sampling fields data from regions (cellZoneSet) caduqued OpenFOAM Post-Processing 6 November 22, 2012 09:28
accepted values in some fields in fluent setup zikozaki01 FLUENT 1 February 23, 2012 10:45
[swak4Foam] funkySetFields and multiple sets and fields mturcios777 OpenFOAM Community Contributions 1 January 7, 2012 17:51
Comparing values of two different fields sambatra OpenFOAM Running, Solving & CFD 0 October 30, 2009 04:13
PostChannel maka OpenFOAM Post-Processing 5 July 22, 2009 09:15


All times are GMT -4. The time now is 08:06.