CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] give me an example for setting of a cell for run-time in swak type (https://www.cfd-online.com/Forums/openfoam-community-contributions/116869-give-me-example-setting-cell-run-time-swak-type.html)

immortality April 26, 2013 13:56

give me an example for setting of a cell for run-time in swak type
 
could anyone send me an example on how a dictionary for obtaining a value in a cell by using swak4FOAM type during run?

gschaider April 26, 2013 14:29

Quote:

Originally Posted by immortality (Post 423393)
could anyone send me an example on how a dictionary for obtaining a value in a cell by using swak4FOAM type during run?

That is called probes and you don't need swak for this. Have a look in the tutorials: OpenFOAM-2.2.x/tutorials/incompressible/pisoFoam/les/pitzDaily/system/controlDict

immortality April 26, 2013 18:12

thanks.but the outputs of swak4FOAM functions I use are better arrange(I have nine probes)
current output is like so:
Code:

#              x                0            0.0345            0.069                0            0.0345            0.069                0            0.0345            0.069
#              y            0.0005            0.0005            0.0005            0.002            0.002            0.002            0.0035            0.0035            0.0035
#              z                0                0                0                0                0                0                0                0                0
#            Time
  0.000426862069      987181.4852      698132.3896      633736.7367      950725.3402      703586.8724      646703.9776      951830.3411      700223.3411        658090.757
  0.0004268965517      985009.8388      698252.7202      633416.7212      950890.0759      703619.4702      646555.4819      951794.7584      700263.6999      658309.2365
  0.0004269310345        982514.794        698373.076        633100.808      950940.2137      703648.8231      646405.8917      951652.2234      700308.5671      658522.4797
  0.0004269655172      979719.7081        698493.238      632789.0162      950881.6356      703674.9236        646255.249      951420.4468        700357.748      658730.3369
        0.000427      976648.2616      698612.9871      632481.3656      950720.3204      703697.7661      646103.5983      951117.1498      700411.0356        658932.66
  0.0004270344828        973324.461      698732.1054      632177.8757      950462.3539      703717.3466      645950.9872      950760.0485      700468.2697      659129.3023
  0.0004270689655      969772.5792      698850.3774      631878.5627      950113.8371      703733.6617      645797.4667      950365.6594      700528.7386      659320.1189

at not a good order.there isn't any swak function for probes?

gschaider April 28, 2013 16:51

Quote:

Originally Posted by immortality (Post 423422)
thanks.but the outputs of swak4FOAM functions I use are better arrange(I have nine probes)
current output is like so:
Code:

#              x                0            0.0345            0.069                0            0.0345            0.069                0            0.0345            0.069
#              y            0.0005            0.0005            0.0005            0.002            0.002            0.002            0.0035            0.0035            0.0035
#              z                0                0                0                0                0                0                0                0                0
#            Time
  0.000426862069      987181.4852      698132.3896      633736.7367      950725.3402      703586.8724      646703.9776      951830.3411      700223.3411        658090.757
  0.0004268965517      985009.8388      698252.7202      633416.7212      950890.0759      703619.4702      646555.4819      951794.7584      700263.6999      658309.2365
  0.0004269310345        982514.794        698373.076        633100.808      950940.2137      703648.8231      646405.8917      951652.2234      700308.5671      658522.4797
  0.0004269655172      979719.7081        698493.238      632789.0162      950881.6356      703674.9236        646255.249      951420.4468        700357.748      658730.3369
        0.000427      976648.2616      698612.9871      632481.3656      950720.3204      703697.7661      646103.5983      951117.1498      700411.0356        658932.66
  0.0004270344828        973324.461      698732.1054      632177.8757      950462.3539      703717.3466      645950.9872      950760.0485      700468.2697      659129.3023
  0.0004270689655      969772.5792      698850.3774      631878.5627      950113.8371      703733.6617      645797.4667      950365.6594      700528.7386      659320.1189

at not a good order.there isn't any swak function for probes?

Not sure what your problem with this output is. The only similar thing that swak offers is set with the type cloud. But that "only" allows you calculations and one output (or output with the dumpVariables-functionObject)

immortality April 28, 2013 18:16

1 Attachment(s)
its like the attachment not arranged like in CODE tag.
and I dont know how to plot variables for each point.
couldn't it be in separated folders like swak's?

immortality April 29, 2013 08:53

do you mean it doesn't have an output of value lists?just one result number in each time step or what?
isn't it appropriate by adding a expression?
Code:

createThrePointSet
    {
        type createSampledSet;
        outputControl timeStep;
        outputInterval 1;
        setName threePoints;
        set {
            type cloud;
            axis x;
            points (
                (0.1 0.14 0.0001)
                (0.0 0.02 0.0001)
                (-0.1 0.02 0.0001)
            );
        }
        writeSetOnConstruction true;
        autoWriteSet true;
        setFormat vtk;
    }


gschaider April 29, 2013 11:01

Quote:

Originally Posted by immortality (Post 423702)
its like the attachment not arranged like in CODE tag.
and I dont know how to plot variables for each point.
couldn't it be in separated folders like swak's?

I don't understand you obsession with separate files for each point. You can always have a probe for each point separately .... done. Otherwise: load the file with all nine points into the Spreadsheet and delete the columns you don't need.

immortality April 29, 2013 11:19

ok.resolved.thanks.
how can write in each time step like what swak does not each writing time?
Code:

probes
    {
        type            probes;
        functionObjectLibs ("libsampling.so");
        enabled        true;
        outputControl  outputTime;
        outputInterval  1;

        fields
        (
            p
            T
            U
        );

        probeLocations
        (
            ( 0 0.0005 0 )
            ( 0.0345 0.0005 0 )
            ( 0.069 0.0005 0 )
            ( 0 0.002 0 )
            ( 0.0345 0.002 0)
            ( 0.069 0.002 0 )
            ( 0 0.0035 0 )
            ( 0.0345 0.0035 0 )
            ( 0.069 0.0035 0 )
        );

    }

}

could you tell me a bit about type cloud?


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