CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   release a passive scalar from within the computational domain & toposet (https://www.cfd-online.com/Forums/openfoam/132484-release-passive-scalar-within-computational-domain-toposet.html)

Barry April 1, 2014 11:32

release a passive scalar from within the computational domain & toposet
 
Dear openFoamers,

I would like to release a (passive) scalar of constant flux from a certain region inside the computational domain at every time step. The mesh was generated using gambit. As a beginner in openfoam, I think the way forward is to create a toposet of the region that I am interested in. If this is the correct approach, could any of you kindly let me know the steps to generate a topoSet and associate the scalar source term to this set.

Many thanks in advance,
Barry

tian April 7, 2014 14:23

Hi Barry,

do you still need a solutions? Here is an example created by BIM HVACTool.

My Steps:

1) You create all you STLs for your certain region inside like me: two small boxes.
2) Save all your STLs in your case folder.
3) Set up your topoSetDict and run it:

Code:

/*---------------------------------------------------------------------------*\
|=========                |                                                  |
|\\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox            |
| \\    /    O peration    | Version:  2.2.2                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|  \\/      M anipulation |                                                  |
\*---------------------------------------------------------------------------*/
// Exported by BIM HVACTool Version 0.9.6.3//

FoamFile
{
    version        2.2;
    format          ascii;
    class          dictionary;
    location        "system";
    object          topoSetDict;
}

actions
(
   
    {
        name            PorousMediaDict_box_1;
        type            cellSet;
        action          new;
        source          surfaceToCell;
        sourceInfo
        {
            file            "PorousMediaDict_box_1.stl";
            useSurfaceOrientation false;
            outsidePoints  ((9 17 5));
            includeCut      true;
            includeInside  true;
            includeOutside  false;
            nearDistance    -1;
            curvature      0;
        }

    }

   
    {
        name            PorousMediaDict_box;
        type            cellSet;
        action          new;
        source          surfaceToCell;
        sourceInfo
        {
            file            "PorousMediaDict_box.stl";
            useSurfaceOrientation false;
            outsidePoints  ((9 17 5));
            includeCut      true;
            includeInside  true;
            includeOutside  false;
            nearDistance    -1;
            curvature      0;
        }

    }

);

4) I used the fvOptions for set an explicit value in my domain:

Code:

/*---------------------------------------------------------------------------*\
|=========                |                                                  |
|\\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox            |
| \\    /    O peration    | Version:  2.2.2                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|  \\/      M anipulation |                                                  |
\*---------------------------------------------------------------------------*/
// Exported by BIM HVACTool Version 0.9.6.3//

FoamFile
{
    version        2.2;
    format          ascii;
    class          dictionary;
    location        "system";
    object          fvOptions;
}

PorousMediaDict_box_1
{
    type            scalarExplicitSetValue;
    active          true;
    selectionMode  cellSet;
    cellSet        PorousMediaDict_box_1;
    scalarExplicitSetValueCoeffs
    {
        volumeMode      absolute;
        injectionRate
        {
            T              309;
        }

    }

}

PorousMediaDict_box
{
    type            scalarExplicitSetValue;
    active          true;
    selectionMode  cellSet;
    cellSet        PorousMediaDict_box;
       
    scalarExplicitSetValueCoeffs
    {
        volumeMode      absolute;
        injectionRate
        {
            T              309;
        }

    }
}

Bye
Thomas


All times are GMT -4. The time now is 00:33.