CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   implementation of mapFields into parallel transient case (http://www.cfd-online.com/Forums/openfoam-pre-processing/102634-implementation-mapfields-into-parallel-transient-case.html)

simpomann May 30, 2012 08:16

implementation of mapFields into parallel transient case
 
Hey,

I calculate a flow around an object, based on the motorBike tutorial.
A steady-state case is set up, that creates a directory at timestep 50 that i want to implement into my transient case. The snappyHexMesh options are the same for both.

Unluckily i am not sure how i can implement the mapFields function into my transient-Allrun.

My steady-state Allrun (solver is SIMPLE, results look allright)
Code:

#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

cp system/fvSolution.OF2.1.0 system/fvSolution
cp system/fvSchemes.OF2.1.0 system/fvSchemes
cp 0.org/nut.OF2.1.0 0.org/nut
cp constant/polyMesh/blockMeshDict.OF2.1.0 constant/polyMesh/blockMeshDict
cp -r 0.org 0 > /dev/null 2>&1

runApplication blockMesh

runApplication snappyHexMesh -overwrite

runApplication decomposePar

runParallel renumberMesh 6 -overwrite

runParallel potentialFoam 6 -initialiseUBCs -noFunctionObjects

runParallel `getApplication` 6

runApplication reconstructPar -time 50

My transient-case Allrun: (solver is PIMPLE)

Code:

#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

cp system/fvSolution.OF2.1.0 system/fvSolution
cp system/fvSchemes.OF2.1.0 system/fvSchemes
cp 0.org/nut.OF2.1.0 0.org/nut
cp constant/polyMesh/blockMeshDict.OF2.1.0 constant/polyMesh/blockMeshDict
cp -r 0.org 0 > /dev/null 2>&1

runApplication blockMesh

runApplication snappyHexMesh -overwrite

mapFields /home/simon/openFoam/nachstellen/startwerte/ -sourceTime 50 -consistent

runApplication decomposePar

runParallel renumberMesh 6 -overwrite

runParallel `getApplication` 6

runApplication reconstructParMesh -constant -mergeTol 1e-6

runApplication reconstructPar

During the mapping process no error appears in the terminal window. All log files seem okay except for the pimple log!

And this is my PIMPLE log:
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : pimpleFoam -parallel
Date  : May 30 2012
Time  : 13:57:50
Host  : "simon-desktop"
PID    : 5693
Case  : /home/simon/openFoam/nachstellen/parallel
nProcs : 6
Slaves :
5
(
"simon-desktop.5694"
"simon-desktop.5695"
"simon-desktop.5696"
"simon-desktop.5697"
"simon-desktop.5698"
)

Pstream initialized with:
    floatTransfer    : 0
    nProcsSimpleSum  : 0
    commsType        : nonBlocking
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model SpalartAllmarasDDES
No field sources present


PIMPLE: Operating solver in PISO mode


Starting time loop

Courant Number mean: 0.135977 max: 5.28681
Time = 0.001

DILUPBiCG:  Solving for Ux, Initial residual = 0.00271502, Final residual = 2.0949e-06, No Iterations 5
DILUPBiCG:  Solving for Uy, Initial residual = 0.00274523, Final residual = 4.48912e-06, No Iterations 4
DILUPBiCG:  Solving for Uz, Initial residual = 0.00143448, Final residual = 5.34199e-06, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.294934, Final residual = 0.00136378, No Iterations 4
time step continuity errors : sum local = 6.86498e-08, global = -3.4579e-09, cumulative = -3.4579e-09
GAMG:  Solving for p, Initial residual = 0.0391325, Final residual = 8.14741e-07, No Iterations 16
time step continuity errors : sum local = 4.55977e-11, global = -2.81814e-12, cumulative = -3.46072e-09
[1] [5] #0  Foam::error::printStack(Foam::Ostream&)[3] [4] #0[0]  Foam::error::printStack(Foam::Ostream&)[2] #0  Foam::error::printStack(Foam::Ostream&)#0  Foam::error::printStack(Foam::Ostream&)##0  Foam::error::printStack(Foam::Ostream&)0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[5] #1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[4] #1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[1] #1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[3] #1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[2] #1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[0] #1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[1] #2  Uninterpreted:
[1] #3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[4] #2  Uninterpreted:
[4] #3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[2] #2  Uninterpreted:
[2] #3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[5] #2  Uninterpreted:
[5] #3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[1] #4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[3] #2  Uninterpreted:
[3] #3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[4] #4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[2] #4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[0] #2  Uninterpreted:
[0] #3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[3] #4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[0] #4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
[1] #5  Foam::fvMatrix<double>::solve() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
[4] #5  Foam::fvMatrix<double>::solve() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
[2] #5  Foam::fvMatrix<double>::solve() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
[5] #4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
[4] #6  Foam::incompressible::LESModels::SpalartAllmaras::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
[3] #5  Foam::fvMatrix<double>::solve() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
[2] #6  Foam::incompressible::LESModels::SpalartAllmaras::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
[0] #5  Foam::fvMatrix<double>::solve() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
[5] #5  Foam::fvMatrix<double>::solve() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
[3] #6  Foam::incompressible::LESModels::SpalartAllmaras::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[4] #7  Foam::incompressible::LESModel::correct() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
[5] #6  Foam::incompressible::LESModels::SpalartAllmaras::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
[1] #6  Foam::incompressible::LESModels::SpalartAllmaras::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
[0] #6  Foam::incompressible::LESModels::SpalartAllmaras::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[3] #7  Foam::incompressible::LESModel::correct() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[2] #7  Foam::incompressible::LESModel::correct() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[1] #7  Foam::incompressible::LESModel::correct() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[5] #7  Foam::incompressible::LESModel::correct() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[0] #7  Foam::incompressible::LESModel::correct() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[2] #8  in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[4] #8  in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[1] #8  in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[0] #8  in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[3] #8  in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so"
[5] #8 




[4]  in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/pimpleFoam"
[4] #9  __libc_start_main
[2]  in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/pimpleFoam"
[2] #9  __libc_start_main[0]  in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/pimpleFoam"
[0] #9  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
[4] #10  [1]  in [3]  in "/opt/openf"/opt/openfoam210/platfooam210/platforms/linuxGccDPOpt/bin/pimpleFoam"
rms/linuxGccDPOpt/bin/pimpleFoam"
[1] #9  [3] #9  __libc_start_main__libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
[0] #10 
[5]  in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/pimpleFoam"
[5] #9  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
[2] #10  in "/lib/tls/i686/cmov/libc.so.6"
[1] #10  in "/lib/tls/i686/cmov/libc.so.6"
[5] #10 
[4]  in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/pimpleFoam"
[simon-desktop:05697] *** Process received signal ***
[simon-desktop:05697] Signal: Floating point exception (8)
[simon-desktop:05697] Signal code:  (-6)
[simon-desktop:05697] Failing at address: 0x1641
[simon-desktop:05697] [ 0] [0xb777e410]
[simon-desktop:05697] [ 1] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so(_ZN4Foam6sigFpe10sigHandlerEi+0x61) [0xb6055ea1]
[simon-desktop:05697] [ 2] [0xb777e400]
[simon-desktop:05697] [ 3] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE5solveERKNS_10dictionaryE+0x165) [0xb69c3f45]
[simon-desktop:05697] [ 4] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so(_ZN4Foam8fvMatrixIdE5solveEv+0xe5) [0xb74a5e45]
[simon-desktop:05697] [ 5] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so(_ZN4Foam14incompressible9LESModels15SpalartAllmaras7correctERKNS_3tmpINS_14GeometricFieldINS_6TensorIdEENS_12fvPatchFieldENS_7volMeshEEEEE+0xa6b) [0xb73003eb]
[simon-desktop:05697] [ 6] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so(_ZN4Foam14incompressible8LESModel7correctEv+0x44) [0xb72ae724]
[simon-desktop:05697] [ 7] pimpleFoam() [0x805f34e]
[simon-desktop:05697] [ 8] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb59a9bd6]
[simon-desktop:05697] [ 9] pimpleFoam() [0x805bee1]
[simon-desktop:05697] *** End of error message ***

 in "/lib/tls/i686/cmov/libc.so.6"
[3] #10 
[0]  in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/pimpleFoam"
[simon-desktop:05693] *** Process received signal ***
[simon-desktop:05693] Signal: Floating point exception (8)
[simon-desktop:05693] Signal code:  (-6)
[simon-desktop:05693] Failing at address: 0x163d
[simon-desktop:05693] [ 0] [0xb7737410]
[simon-desktop:05693] [ 1] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so(_ZN4Foam6sigFpe10sigHandlerEi+0x61) [0xb600eea1]
[simon-desktop:05693] [ 2] [0xb7737400]
[simon-desktop:05693] [ 3] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE5solveERKNS_10dictionaryE+0x165) [0xb697cf45]
[simon-desktop:05693] [ 4] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so(_ZN4Foam8fvMatrixIdE5solveEv+0xe5) [0xb745ee45]
[simon-desktop:05693] [ 5] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so(_ZN4Foam14incompressible9LESModels15SpalartAllmaras7correctERKNS_3tmpINS_14GeometricFieldINS_6TensorIdEENS_12fvPatchFieldENS_7volMeshEEEEE+0xa6b) [0xb72b93eb]
[simon-desktop:05693] [ 6] /opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleLESModels.so(_ZN4Foam14incompressible8LESModel7correctEv+0x44) [0xb7267724]
[simon-desktop:05693] [ 7] pimpleFoam() [0x805f34e]
[simon-desktop:05693] [ 8] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb5962bd6]
[simon-desktop:05693] [ 9] pimpleFoam() [0x805bee1]
[simon-desktop:05693] *** End of error message ***

--------------------------------------------------------------------------
mpirun noticed that process rank 4 with PID 5697 on node simon-desktop exited on signal 8 (Floating point exception).
--------------------------------------------------------------------------

Without the mapFields, my case should work. For sure it does without parallel-settings and map-fields.

Big thanks in advance, i am new to this programme (got started 1 month ago) and completely lost. I will give all necessary information, please help me!

I am completely unsure about how to implement parallelization and mapping correctly. I reconstruct time 50 in my steady-state case because mapFields with -sourceParallel doesn't work at all.
I want the transient-case to take the fields from my steady-state case as initial conditions. Am I on the right track?

Best regards,

Simon

SirWombat June 1, 2012 02:47

Hi Simon,

there's this: "Courant Number mean: 0.135977 max: 5.28681"

It seems a little high. Try to start with a smaller initial timestep. I guess you started with DeltaT = 0.001 ... so try 0.0001 or even lower.

What about MeshQuality, have you checked?

Greets Jan

simpomann June 1, 2012 13:13

Hey,

Thanks for your advice! I added
"adjustTimeStep yes;
maxCo 1.0;

to my transient case Allrun and now the solver is working.
Good success.

Unluckily the mapping still doesn't work.
The message appearing within the terminal window:
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : mapFields /home/simon/openFoam/longterm/startwerte -consistent -parallelSource
Date  : Jun 01 2012
Time  : 19:04:02
Host  : "simon-desktop"
PID    : 2038
Case  : /home/simon/openFoam/longterm/parallel
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: "/home/simon/openFoam/longterm" "startwerte"
Target: "/home/simon/openFoam/longterm" "parallel"

Create databases as time
Create target mesh

Target mesh size: 1253378

Source processor 0

Source time: 0
Target time: 0
mesh size: 417792
--> FOAM Warning :
    From function meshToMesh::calcAddressing()
    in file meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C at line 156
    Source patch inlet has no faces. Not performing mapping for it.

Mapping fields for time 0

    interpolating ccz
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Uninterpreted:
#3 
 in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/mapFields"
#4 
 in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/mapFields"
#5 
 in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/mapFields"
#6 
 in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/mapFields"
#7 
 in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/mapFields"
#8  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#9 
 in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/mapFields"
Segmentation fault

How can I implement the mapping?

sebas September 3, 2012 11:33

Hey simon!

sorry for the lag but I'm quite new to the forum.

It looks like mapFields wants to map the stuff in the "0" time folder (which is not reconstructed). That's why it complains about the empty patch.

You should change your startTime in your target controlDict to 50 and/or maybe create a folder for time "50" as well.

Hope that helps.

B.T.W. it should work without reconstructing to if you give it the options -parallelSource (and -parallelTarget)


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