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] what does these Swak post processing mean? (https://www.cfd-online.com/Forums/openfoam-community-contributions/116899-what-does-these-swak-post-processing-mean.html)

immortality April 27, 2013 17:46

what does these Swak post processing mean?
 
what does this warnining mean?
Code:

--> FOAM Warning :
    From function SampledSurface &SurfacesRepository::getSurface
    in file repositories/SurfacesRepository.C at line 130
    Already got a surface named normal_Plane_1. There is a specification for the surface here which is ignored. It is:

{
    type            plane;
    basePoint      ( 0.01725 0.002 0 );
    normalVector    ( 1 0 0 );
    interpolate    true;
}

--> FOAM Warning :
    From function SampledSurface &SurfacesRepository::getSurface
    in file repositories/SurfacesRepository.C at line 130
    Already got a surface named normal_Plane_1. There is a specification for the surface here which is ignored. It is:

{
    type            plane;
    basePoint      ( 0.01725 0.002 0 );
    normalVector    ( 1 0 0 );
    interpolate    true;
}

--> FOAM Warning :
    From function SampledSurface &SurfacesRepository::getSurface
    in file repositories/SurfacesRepository.C at line 130
    Already got a surface named normal_Plane_1. There is a specification for the surface here which is ignored. It is:

{
    type            plane;
    basePoint      ( 0.01725 0.002 0 );
    normalVector    ( 1 0 0 );
    interpolate    true;
}

--> FOAM Warning :
    From function SampledSurface &SurfacesRepository::getSurface
    in file repositories/SurfacesRepository.C at line 130

I have set planes as this:
Code:

surfacePlane_n1_velocity
    {
        type swakExpression;
        valueType surface;
        surfaceName normal_Plane_1;
        verbose true;
        surface {
            type plane;
            basePoint      (0.01725 0.002 0);
            normalVector    (1 0 0);
            interpolate true;
        }
        expression "mag(U)";
        accumulations (
            min
            max
            average
        );
    }
    surfacePlane_n1_pressure
    {
        $surfacePlane_n1_velocity;
        expression "p";
    }
    surfacePlane_n1_Temperature
    {
        $surfacePlane_n1_velocity;
        expression "T";
    }
    surfacePlane_n1_totalPressure
    {
        $surfacePlane_n1_velocity;
        expression "p+.5*rho*magSqr(U)";
    }

is this incorrect?

immortality April 29, 2013 07:47

it displayes a warning error that "the plane is specified".
I think its because of $surfacePlane_n1_velocity; that defines the plane again.how can I except it to not repeat in other functions?
a hint?

immortality April 29, 2013 11:28

which lines should be mentioned since this warning not to be displayed and also avoid repeated things?

wyldckat April 29, 2013 18:16

Hi Ehsan,

I got the private message you sent me. You could have told me which thread you were talking about, so that I wouldn't have to look for it :rolleyes:.

And sorry, but this is a bit too obvious :rolleyes: So I'm going to answer in a playful way :D

I'm going to do a magic trick... You have this:
Quote:

Code:

    surfacePlane_n1_pressure
    {
        $surfacePlane_n1_velocity;
        expression "p";
    }


I'm going to add only a single line and make the problem disappear (actually I haven't tested it yet) :
Code:

    surfacePlane_n1_pressure
    {
        $surfacePlane_n1_velocity;
        expression "p";
        surfaceName normal_Plane_2;
    }

The explanation? It's simple! Notice that the only thing different on what you already had, was the line:
Code:

expression "p";
This line replaced the previous one:
Code:

expression "mag(U)";
Therefore, all you have to do is repeat the "surfaceName" entry on each needed block and the problem should be solved!

Best regards,
Bruno

immortality April 30, 2013 06:03

thanks for answer.I'm sorry for that.I forgot it again!
I had tested it before.but the warning persists:
Code:

swak4Foam: Allocating new repository for sampledSurfaces
--> FOAM Warning :
    From function SampledSurface &SurfacesRepository::getSurface
    in file repositories/SurfacesRepository.C at line 130
    Already got a surface named normal_Plane_1. There is a specification for the surface here which is ignored. It is:

{
    type            plane;
    basePoint      ( 0.01725 0.002 0 );
    normalVector    ( 1 0 0 );
    interpolate    true;
}

--> FOAM Warning :
    From function SampledSurface &SurfacesRepository::getSurface
    in file repositories/SurfacesRepository.C at line 130
    Already got a surface named normal_Plane_1. There is a specification for the surface here which is ignored. It is:

{
    type            plane;
    basePoint      ( 0.01725 0.002 0 );
    normalVector    ( 1 0 0 );
    interpolate    true;
}

--> FOAM Warning :
    From function SampledSurface &SurfacesRepository::getSurface
    in file repositories/SurfacesRepository.C at line 130
    Already got a surface named normal_Plane_1. There is a specification for the surface here which is ignored. It is:

{
    type            plane;
    basePoint      ( 0.01725 0.002 0 );
    normalVector    ( 1 0 0 );
    interpolate    true;
}

--> FOAM Warning :
    From function SampledSurface &SurfacesRepository::getSurface
    in file repositories/SurfacesRepository.C at line 130

the functions on one of surfaces are like this:
Code:

surfacePlane_n1_velocity
    {
        type swakExpression;
        valueType surface;
        surfaceName normal_Plane_1;
        verbose true;
        surface {
            type plane;
            basePoint      (0.01725 0.002 0);
            normalVector    (1 0 0);
            interpolate true;
        }
        expression "mag(U)";
        accumulations (
            min
            max
            average
        );
    }
    surfacePlane_n1_pressure
    {
        $surfacePlane_n1_velocity;
        surfaceName normal_Plane_1;
        expression "p";
    }
    surfacePlane_n1_Temperature
    {
        $surfacePlane_n1_velocity;
        surfaceName normal_Plane_1;
        expression "T";
    }
    surfacePlane_n1_totalPressure
    {
        $surfacePlane_n1_velocity;
        surfaceName normal_Plane_1;
        expression "p+.5*rho*magSqr(U)";
    }

that I've added surfaceName normal_Plane_1; to all of them but the above message is repeated.:confused:
(all functions are on one surface)

immortality April 30, 2013 06:25

and how can i delete a repeated post of mine like above?
i can't find any button in edit!

wyldckat April 30, 2013 17:41

Hi Ehsan,

It looks like you're getting pretty tired... didn't you notice something different in the line I added?
Quote:

Originally Posted by wyldckat (Post 424031)
Code:

    surfacePlane_n1_pressure
    {
        $surfacePlane_n1_velocity;
        expression "p";
        surfaceName normal_Plane_2;
    }


I changed the name from "normal_Plane_1" to "normal_Plane_2" for the "surfacePlane_n1_pressure" group! The idea is to replace the name on each new block with a new name!

Quote:

Originally Posted by immortality (Post 424131)
and how can i delete a repeated post of mine like above?
i can't find any button in edit!

This is another indication that you need sleep... I've already told you in the past that only administrators and moderators can delete posts.
If you need a post to be deleted, report your own post through the triangle on the lower left corner of the post: http://www.cfd-online.com/Forums/ima...ons/report.gif

The other possibility is to edit the second post, remove all of the content and replace with something like "sorry, accidental double-post".

Best regards,
Bruno

edit: I forgot to mention that I've deleted the repeated post.

immortality May 1, 2013 04:17

i thought you have mistakenly understand it.so you mean introduce a different name for the same plane(only due to field difference)?
i thought that was only related to threads not the poor posts!

wyldckat May 1, 2013 04:45

The idea is to use different names for each plane. The planes will all have the same definitions, but different names.

immortality May 1, 2013 05:02

you mean different names for one plane.do i understand truely?
its fine now.without warning.:)
but a question:is there any way to put all folders to a single folder and organizing them ?because its a lot of crowd there!;)

wyldckat May 1, 2013 10:54

Quote:

Originally Posted by immortality (Post 424371)
but a question:is there any way to put all folders to a single folder and organizing them ?because its a lot of crowd there!;)

It depends... do the files inside those folders have the same name?

immortality May 1, 2013 11:41

no their names are different due to different function names.
I only wanted a little more arrangement.
if its not simple I guess its so its not important at all.never mind dear Bruno.thank you.:D;)

wyldckat May 1, 2013 14:02

Well, if the names are different, then you can follow this example:
  1. Create a folder where you want to place the files in. For example:
    Code:

    mkdir myNeatResults
  2. If the folder structure is something like this:
    Code:

    output1/0/myOutputFile1
    output2/0/myOutputFile2
    output3/0/myOutputFile3
    output4/0/myOutputFile4

    Then you can move them all in a single go:
    Code:

    mv output*/0/* myNeatResults/
    Change "mv" to "cp" if you only want to copy.
  3. If you want to first check know which files you are planning to move, run:
    Code:

    echo output*/0/*
  4. This is explained here: Meta-characters and Filename expansion

immortality May 1, 2013 15:06

then should not be vwey difficult!:D
folders are like
Code:

ehsan@Ehsan-com:~/Desktop/WR_pimple_p/swakExpression_pressure_left$ tree
.
├── 0
│  └── pressure_left
├── 0.000124
│  └── pressure_left
├── 0.000231
│  └── pressure_left
├── 0.000239
│  └── pressure_left
├── 0.0003
│  └── pressure_left
├── 0.000475
│  └── pressure_left
├── 0.00049
│  └── pressure_left
├── 0.00053
│  └── pressure_left
├── 0.000539
│  └── pressure_left
├── 0.000544
│  └── pressure_left
├── 0.000558
│  └── pressure_left
├── 0.000563
│  └── pressure_left
├── 0.000616
│  └── pressure_left
├── 0.000652
│  └── pressure_left
├── 0.000666
│  └── pressure_left
├── 0.000668
│  └── pressure_left
├── 0.000696
│  └── pressure_left
└── 0.000699
    └── pressure_left

and:
Code:

ehsan@Ehsan-com:~/Desktop/WR_pimple_p/swakExpression_surfacePlane_h1_totalPressure$ tree
.
├── 0
│  └── surfacePlane_h1_totalPressure
├── 0.000124
│  └── surfacePlane_h1_totalPressure
├── 0.000231
│  └── surfacePlane_h1_totalPressure
├── 0.000239
│  └── surfacePlane_h1_totalPressure
├── 0.0003
│  └── surfacePlane_h1_totalPressure
├── 0.000475
│  └── surfacePlane_h1_totalPressure
├── 0.00049
│  └── surfacePlane_h1_totalPressure
├── 0.00053
│  └── surfacePlane_h1_totalPressure
├── 0.000539
│  └── surfacePlane_h1_totalPressure
├── 0.000544
│  └── surfacePlane_h1_totalPressure
├── 0.000558
│  └── surfacePlane_h1_totalPressure
├── 0.000563
│  └── surfacePlane_h1_totalPressure
├── 0.000616
│  └── surfacePlane_h1_totalPressure
├── 0.000652
│  └── surfacePlane_h1_totalPressure
├── 0.000666
│  └── surfacePlane_h1_totalPressure
├── 0.000668
│  └── surfacePlane_h1_totalPressure
├── 0.000696
│  └── surfacePlane_h1_totalPressure
└── 0.000699
    └── surfacePlane_h1_totalPressure

and from out of them:
Code:

swakExpression_surfacePlane_n2_Temperature
│  ├── 0
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000124
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000231
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000239
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.0003
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000475
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.00049
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.00053
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000539
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000544
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000558
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000563
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000616
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000652
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000666
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000668
│  │  └── surfacePlane_n2_Temperature
│  ├── 0.000696
│  │  └── surfacePlane_n2_Temperature
│  └── 0.000699
│      └── surfacePlane_n2_Temperature
├── swakExpression_surfacePlane_n2_totalPressure
│  ├── 0
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000124
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000231
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000239
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.0003
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000475
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.00049
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.00053
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000539
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000544
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000558
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000563
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000616
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000652
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000666
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000668
│  │  └── surfacePlane_n2_totalPressure
│  ├── 0.000696
│  │  └── surfacePlane_n2_totalPressure
│  └── 0.000699
│      └── surfacePlane_n2_totalPressure
├── swakExpression_surfacePlane_n2_velocity
│  ├── 0
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000124
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000231
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000239
│  │  └── surfacePlane_n2_velocity
│  ├── 0.0003
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000475
│  │  └── surfacePlane_n2_velocity
│  ├── 0.00049
│  │  └── surfacePlane_n2_velocity
│  ├── 0.00053
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000539
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000544
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000558
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000563
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000616
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000652
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000666
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000668
│  │  └── surfacePlane_n2_velocity
│  ├── 0.000696
│  │  └── surfacePlane_n2_velocity
│  └── 0.000699
│      └── surfacePlane_n2_velocity
├── swakExpression_surfacePlane_n3_pressure
│  ├── 0
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000124
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000231
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000239
│  │  └── surfacePlane_n3_pressure
│  ├── 0.0003
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000475
│  │  └── surfacePlane_n3_pressure
│  ├── 0.00049
│  │  └── surfacePlane_n3_pressure
│  ├── 0.00053
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000539
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000544
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000558
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000563
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000616
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000652
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000666
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000668
│  │  └── surfacePlane_n3_pressure
│  ├── 0.000696
│  │  └── surfacePlane_n3_pressure
│  └── 0.000699
│      └── surfacePlane_n3_pressure
├── swakExpression_surfacePlane_n3_Temperature
│  ├── 0
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000124
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000231
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000239
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.0003
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000475
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.00049
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.00053
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000539
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000544
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000558
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000563
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000616
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000652
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000666
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000668
│  │  └── surfacePlane_n3_Temperature
│  ├── 0.000696
│  │  └── surfacePlane_n3_Temperature
│  └── 0.000699
│      └── surfacePlane_n3_Temperature

is it possible to write a script for them?:D

wyldckat May 1, 2013 16:00

I forgot you probably had something complicated like that... where you have not just one time folder per sample, but in fact dozens of time folders per sample... :rolleyes:

Quote:

Originally Posted by immortality (Post 424488)
is it possible to write a script for them?:D

Well, it's both simple and completely different from my previous answer :(. The following instructions depend on the script made on the other thread http://www.cfd-online.com/Forums/ope...tml#post422410 (both posts #68 and #71):
  1. Create a new file with the following content:
    Code:

    #!/bin/bash
    mkdir myNeatResults

    ./mergeOutputFolderWith0 swakExpression_pressure_left pressure_left > myNeatResults/pressure_left

    ./mergeOutputFolderWith0 swakExpression_surfacePlane_h1_totalPressure surfacePlane_h1_totalPressure > myNeatResults/surfacePlane_h1_totalPressure

    ./mergeOutputFolderWith0 swakExpression_surfacePlane_n2_Temperature surfacePlane_n2_Temperature > myNeatResults/surfacePlane_n2_Temperature

  2. Save the file, for example with the name "doThemAll".
  3. Make the file executable:
    Code:

    chmod +x doThemAll
  4. And run it:
    Code:

    ./doThemAll

immortality May 2, 2013 09:30

1 Attachment(s)
thank you.how is it possible to do this on probes in that is in postProcessing folder?

wyldckat May 2, 2013 09:35

Quote:

Originally Posted by immortality (Post 424671)
thank you.how is it possible to do this on probes in that is in postProcessing folder?

Sorry, I don't understand the question. Can you describe what you have and what you want to achieve?

immortality May 2, 2013 10:21

like before folders but some difference in arrangement.each time folder has 3 files:p,T,U.I want to accumulate all times in 0 folder like other post processing folders we had until now.
summarily its better to have only one folder with p,T and U files that are from time 0 till end of the run.;)

wyldckat May 2, 2013 10:27

Is this what you mean?
Code:

./mergeOutputFolderWith0 probes U > myNeatResults/U
Or maybe:
Code:

./mergeOutputFolderWith0 postProcessing/probes U > myNeatResults/U

immortality May 2, 2013 11:28

thanks.that works fine now.
it has became this if someone wants to use such a verbose output in future:D:
Code:

#!/bin/bash
mkdir myNeatResults



./merge swakExpression_flowInlet flowInlet > myNeatResults/flowInlet
./merge swakExpression_flowOutlet flowOutlet > myNeatResults/flowOutlet

./merge swakExpression_pressure_right pressure_right > myNeatResults/pressure_right
./merge swakExpression_Temperature_right Temperature_right > myNeatResults/Temperature_right
./merge swakExpression_total_pressure_right total_pressure_right > myNeatResults/total_pressure_right
./merge swakExpression_velocity_right velocity_right > myNeatResults/velocity_right


./merge swakExpression_pressure_left pressure_left > myNeatResults/pressure_left
./merge swakExpression_Temperature_left Temperature_left > myNeatResults/Temperature_left
./merge swakExpression_total_pressure_left total_pressure_left > myNeatResults/total_pressure_left
./merge swakExpression_velocity_left velocity_left > myNeatResults/velocity_left

./merge swakExpression_sP_h1_pressure sP_h1_pressure > myNeatResults/sP_h1_pressure
./merge swakExpression_sP_h1_Temperature sP_h1_Temperature > myNeatResults/sP_h1_Temperature
./merge swakExpression_sP_h1_totalPressure sP_h1_totalPressure > myNeatResults/sP_h1_totalPressure
./merge swakExpression_sP_h1_velocity sP_h1_velocity > myNeatResults/sP_h1_velocity


./merge swakExpression_sP_h2_pressure sP_h2_pressure > myNeatResults/sP_h2_pressure
./merge swakExpression_sP_h2_Temperature sP_h2_Temperature > myNeatResults/sP_h2_Temperature
./merge swakExpression_sP_h2_totalPressure sP_h2_totalPressure > myNeatResults/sP_h2_totalPressure
./merge swakExpression_sP_h2_velocity sP_h2_velocity > myNeatResults/sP_h2_velocity


./merge swakExpression_sP_h3_pressure sP_h3_pressure > myNeatResults/sP_h3_pressure
./merge swakExpression_sP_h3_Temperature sP_h3_Temperature > myNeatResults/sP_h3_Temperature
./merge swakExpression_sP_h3_totalPressure sP_h3_totalPressure > myNeatResults/sP_h3_totalPressure
./merge swakExpression_sP_h3_velocity sP_h3_velocity > myNeatResults/sP_h3_velocity


./merge swakExpression_sP_n1_pressure sP_n1_pressure > myNeatResults/sP_n1_pressure
./merge swakExpression_sP_n1_Temperature sP_n1_Temperature > myNeatResults/sP_n1_Temperature
./merge swakExpression_sP_n1_totalPressure sP_n1_totalPressure > myNeatResults/sP_n1_totalPressure
./merge swakExpression_sP_n1_velocity sP_n1_velocity > myNeatResults/sP_n1_velocity


./merge swakExpression_sP_n2_pressure sP_n2_pressure > myNeatResults/sP_n2_pressure
./merge swakExpression_sP_n2_Temperature sP_n2_Temperature > myNeatResults/sP_n2_Temperature
./merge swakExpression_sP_n2_totalPressure sP_n2_totalPressure > myNeatResults/sP_n2_totalPressure
./merge swakExpression_sP_n2_velocity sP_n2_velocity > myNeatResults/sP_n2_velocity
./merge swakExpression_sP_n2_Maxp sP_n2_Maxp > myNeatResults/sP_n2_Maxp
./merge swakExpression_sP_n2_MaxU sP_n2_MaxU > myNeatResults/sP_n2_MaxU


./merge swakExpression_sP_n3_pressure sP_n3_pressure > myNeatResults/sP_n3_pressure
./merge swakExpression_sP_n3_Temperature sP_n3_Temperature > myNeatResults/sP_n3_Temperature
./merge swakExpression_sP_n3_totalPressure sP_n3_totalPressure > myNeatResults/sP_n3_totalPressure
./merge swakExpression_sP_n3_velocity sP_n3_velocity > myNeatResults/sP_n3_velocity

./merge postProcessing/probes U > myNeatResults/U
./merge postProcessing/probes T > myNeatResults/T
./merge postProcessing/probes p > myNeatResults/p



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