|
[Sponsors] |
[swak4Foam] swakExpression not writing to log |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 13, 2020, 05:53 |
swakExpression not writing to log
|
#1 |
New Member
Alex Fells
Join Date: Sep 2019
Posts: 5
Rep Power: 7 |
Hello,
I have written a functionObject using a swakExpression to calculate the total volume of a phase in an interFoam simulation by multiplying the local volume coefficient alpha by the cell volume. I have produced it using the damBreak tutorial and then copied the functionObject to another simulation. Unfortunately, when running interFOAM -postProcess in the new simulation, the functionObject is not writing for timesteps other than the initial one. I am running openFOAM 4.1.0 and swakVersion 0.4.2. My controlDict for the case that is not running correctly is included below. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application interFoam; startFrom latestTime; //startTime; startTime 0; stopAt endTime;//writeNow; endTime 60; deltaT 1e-04; writeControl adjustableRunTime; writeInterval 0.1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 1; maxAlphaCo 1; maxDeltaT 0.01; minDeltaT 1e-15; compute ALH no; writeOnCrash no; libs ( "libsprghInterfaceTotalPressurePatchField.so" "libOpenFOAM.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" "libgroovyBC.so" ); functions { dP { type probes; functionObjectLibs ("libsampling.so"); enabled true; writeControl writeTime; fields (p); probeLocations ( (0 0 0) (0 0 1.137) ); } columnHoldUp { type swakExpression; valueType internalField; verbose true; outputControlMode timeStep; outputInterval 1; writeStartTime no; aliases { alpha alpha.HNO3; } expression "vol() * alpha"; accumulations ( sum ); } } // ************************************************************************* // Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 4.1 Exec : interFoam -postProcess Date : Mar 13 2020 Time : 09:39:31 Host : "login2.arc3.leeds.ac.uk" PID : 162027 Case : /nobackup/pm11af/VOF_001 nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 PIMPLE: max iterations = 10 field "(U|p_rgh)" : relTol 0, tolerance 0.001 field "(flm|fmm)" : relTol 0, tolerance 0.0001 swak4Foam: Setting default mesh Time = 0 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type LES Selecting LES turbulence model dynamicLagrangian Selecting LES delta type cubeRootVol dynamicLagrangianCoeffs { filter simple; ce 1.048; theta 3; Ce 1.048; } Reading g Reading hRef Calculating field g.h No MRF models present Time = 0.1 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type LES Selecting LES turbulence model dynamicLagrangian Selecting LES delta type cubeRootVol dynamicLagrangianCoeffs { filter simple; ce 1.048; theta 3; Ce 1.048; } Reading g Reading hRef Calculating field g.h No MRF models present Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application interFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 1; deltaT 0.001; writeControl adjustableRunTime; writeInterval 0.1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 1; maxAlphaCo 1; maxDeltaT 1; libs ( "libOpenFOAM.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" "libgroovyBC.so" ); functions { dP { type probes; functionObjectLibs ("libsampling.so"); enabled true; writeControl writeTime; fields (p); probeLocations ( (0.292 0.292 0) (0.292 0.292 0.0146) ); } columnHoldUp { type swakExpression; valueType internalField; verbose true; outputControlMode timeStep; outputInterval 1; writeStartTime no; aliases { alpha alpha.water; } expression "vol() * alpha"; accumulations ( sum ); } } // ************************************************************************* // Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 4.1 Exec : interFoam -postProcess Date : Mar 13 2020 Time : 09:51:53 Host : "login2.arc3.leeds.ac.uk" PID : 132270 Case : /nobackup/pm11af/functionObjectSandbox nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 PIMPLE: Operating solver in PISO mode swak4Foam: Setting default mesh Time = 0 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : swak4Foam: Allocating new repository for sampledMeshes swak4Foam: Allocating new repository for sampledGlobalVariables sum=0.000646099 Time = 0.1 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000646099 Time = 0.2 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000646099 Time = 0.3 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000646098 Time = 0.4 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000640313 Time = 0.5 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.00063341 Time = 0.6 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000632398 Time = 0.7 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000632398 Time = 0.8 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000632397 Time = 0.9 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000632397 Time = 1 Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading g Reading hRef Calculating field g.h No MRF models present Expression columnHoldUp : sum=0.000632397 End Thanks, Alex Last edited by alexfells; March 16, 2020 at 10:17. |
|
March 15, 2020, 18:00 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
To be honest: I haven't tested these things with the -postProcess option. I usually use funkyDoCalc when I want to evaluate some expressions after the run. So it is possible that this is just not working
I'll have a look whether this can be fixed. But don't hold your breath. The relevant code is a bit fragile because it has to accommodate 3 different OF-branches (OF-Foundation, OF-ESI, Foam-extend) with slightly different behaviour and API of the functionObjects (which is because the functionObjects were rewritten at least 3 times and different distros stayed at different version) BTW: Please use CODE (that is the icon with the # in the edit toolbar) for your examples. CODE is readable: Code:
test { type test; } Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 16, 2020, 15:57 |
|
#3 |
New Member
Alex Fells
Join Date: Sep 2019
Posts: 5
Rep Power: 7 |
Hi, thanks for the reply. I've updated to post to use QUOTE and will have a look at funkyDoCalc.
If I get round to it I'll have a go at incrementally changing my controlDict and try and identify what causes it to break and will post here incase it's useful. Thanks, Alex |
|
March 16, 2020, 19:19 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
CODE! Not QUOTE
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh/splitMeshRegion : region1 in zone "-1" | GuiMagyar | OpenFOAM Meshing & Mesh Conversion | 3 | August 4, 2023 13:38 |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[snappyHexMesh] crash sHM | H25E | OpenFOAM Meshing & Mesh Conversion | 11 | November 10, 2014 12:27 |