# outputTime in Swak function

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 19, 2013, 05:54 outputTime in Swak function #1 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 I have written this SWAK function to write the expression at each outputTime(not each timeStep): Code: ```n1_totalTemperature { type swakExpression; valueType surface; surfaceName normalPlane_T0_1; verbose true; surface { type plane; basePoint (0.01725 0.002 0); normalVector (1 0 0); interpolate true; } expression "sum((T+0.000497517*magSqr(U))*rho*area())/sum(rho*area())"; accumulations ( average ); outputControl outputTime;//outputTime;// outputInterval 1; // 5000 }``` bu it writes still the values in each time step: Code: ```nused output: areaAverage(right) for p = 303977.3946 Unused output: areaAverage(right) for U = (0 -78.27914269 0) Unused output: areaAverage(right) for T = 440.0158214 Unused output: areaAverage(right) for rho = 2.406229408 Unused output: areaAverage(right) for h = 143969.4069 Unused output: Unused output: Expression totalPressure_right : average=311349.633 Unused output: Expression totalTemperature_right : average=443.0644198 Unused output: Expression totalEnthalpy_right : average=202609.9735 Unused output: Expression flowInlet : sum=-0.000200896449 Unused output: faceSource Average_left output: Unused output: areaAverage(left) for p = 328460.3658 Unused output: areaAverage(left) for U = (24.89352103 -84.5762301 0) Unused output: areaAverage(left) for T = 496.1931543 Unused output: areaAverage(left) for rho = 2.355562913 Unused output: areaAverage(left) for h = 204658.9719 Unused output: Unused output: Expression totalPressure_left : average=344793.4867 Unused output: Expression totalTemperature_left : average=494.9186351 Unused output: Expression n1_totalTemperature : average=440 Unused output: Expression n1_totalPressure : average=303975 Unused output: Expression n2_totalTemperature : average=440 Unused output: Expression n2_totalPressure : average=303975 Unused output: Expression n2_MaxU : average=2.00358353e-13 Unused output: Expression n2_Maxp : average=303975 Unused output: Expression n2_pressure_minMax : min=303975 max=303975 Unused output: Expression n3_totalTemperature : average=440 Unused output: Expression n3_totalPressure : average=303975 Unused output: Expression h1_totalTemperature : average=440.0002414 Unused output: Expression h1_totalPressure : average=303975.5373 Unused output: Expression h2_totalTemperature : average=440.0000913 Unused output: Expression h2_totalPressure : average=303975.0635 Unused output: Expression h2_pressure_minMax : min=303975 max=303978.1412 Unused output: Expression h3_totalTemperature : average=440.5776045 Unused output: Expression h3_totalPressure : average=305028.7895 Unused output: Mean and max Courant Numbers = 0.007692142019 0.09958988306``` why? __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. Last edited by immortality; May 20, 2013 at 08:30.

 May 19, 2013, 07:38 #2 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 10,020 Blog Entries: 39 Rep Power: 109 Hi Ehsan, In this case, swak4Foam doesn't use "outputControl". It only uses "outputInterval". Which means that it you'll have to use something like this: Code: `outputInterval 10;` Best regards, Bruno afshinb likes this. __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 May 19, 2013, 07:53 #3 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 Hi Bruno 1)what do you mean by "in this case"? 2)I have a variable timeStep.there isn't any other way to have outputs concurrent with folder writing times to save time? I saw this,what does cloud mean? 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; }``` 3)can use phi on patch in sampledSurfaces? thanks. __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked.

May 19, 2013, 08:00
#4
Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,020
Blog Entries: 39
Rep Power: 109
Hi Ehsan,

1) From what I can figure out, swak4Foam can use "outputControl" in some other function objects. But in this case, namely for "swakExpression", this doesn't work.

2)
Quote:
 I have a variable timeStep.there isn't any other way to have outputs concurrent with folder writing times to save time?
It's necessary to change the source code of swak4Foam for this to be possible.

Quote:
 I saw this,what does cloud mean?
I'm not familiar with this function object... but "cloud" is used for indicating multiple points for sampling.

3) As I said on the email a few minutes ago, "phi" cannot be used with the "sampledSurface" in OpenFOAM's function object, which is why "faceZone" has to be used instead.

Best regards,
Bruno
__________________

May 19, 2013, 17:47
#5
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,016
Rep Power: 43
Quote:
 Originally Posted by wyldckat Hi Ehsan, 1) From what I can figure out, swak4Foam can use "outputControl" in some other function objects. But in this case, namely for "swakExpression", this doesn't work.
For historical reasons all function objects in swak that are based on the simpleFunctionObjects are not based on OutputFilterFunctionObject and therefor do not support outputControl (other function objects do). Incidentally my current development version already supports this.

Quote:
 Originally Posted by wyldckat 2) It's necessary to change the source code of swak4Foam for this to be possible.
Also writing at fixed time intervals is already supported
__________________
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

 May 20, 2013, 04:53 #6 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 Hi Bernhard when does the new version will release?(current version i use is 0.2.3 is there a newer one?) __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked.

May 20, 2013, 06:43
#7
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,016
Rep Power: 43
Quote:
 Originally Posted by immortality Hi Bernhard when does the new version will release?
When it is ready. Intermediate versions are found in the mercurial-repository. But they may contain bugs so use with care. New features are documented in the README

Quote:
 Originally Posted by immortality (current version i use is 0.2.3 is there a newer one?)
No. That is the latest released one
__________________
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

 June 24, 2015, 07:13 #8 Member   Manjunath Reddy Join Date: Jun 2013 Posts: 47 Rep Power: 6 Hi Bernhard I'm writing the variable on the patch using swakEpression Code: ``` Ttop { type swakExpression; valueType patch; patchName top; outputControlMode timeStep; outputInterval 100; region stratumCorneum; expression "T"; accumulations ( average ); verbose true; autoInterpolate true; }``` I added libraries also but it is showing the error Code: ``` --> FOAM FATAL ERROR: Unknown function type swakExpression Valid functions are : 71 ( CourantNo DESModelRegions Lambda2 Peclet Q addForeignMeshes addGlobalVariable calculateGlobalVariables clearExpressionField coded correctThermo createSampledSet createSampledSurface dsmcFields dynamicFunctionObjectListProxy executeIfEnvironmentVariable executeIfExecutableFits executeIfFunctionObjectPresent executeIfObjectExists executeIfOpenFOAMVersionBiggerEqual executeIfParallelSerial executeIfStartTime expressionField fieldDistribution foreignMeshesFollowTime functionObjectListProxy initPotentialFlow initSwakFunctionObject listRegisteredObjects loadCompressibleTurbulenceModel loadIncompressibleTurbulenceModel loadPsiThermoModel loadRhoThermoModel loadSLGThermoModel manipulateField manipulatePatchField panicDump patchAverage patchFieldDistribution patchFieldFlow patchIntegrate patchMassFlow patchMassFlowAverage patchProbes pressureTools probes readAndUpdateFields readGravitation recalcPhi recalcThermoHe removeGlobalVariable scalarTransport setDeltaTByTimeline setTimeStep sets solveLaplacianPDE solveTransportPDE solverPerformanceToGlobalVariables surfaces swakCoded timeActivatedFileUpdate trackDictionary volumeAverage volumeIntegrate volumeMinMax wallShearStress writeAdditionalFields writeAndEndFieldRange writeFieldsOften yPlusLES yPlusRAS ) From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 92. FOAM exiting``` why swakExpression function is not working? Please help me. This is showing this error also Code: ``` --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : /home/mechfoam/OpenFOAM/mechfoam-2.2.x/platforms/linux64GccDPOpt/lib/libsimpleSwakFunctionObjects.so: undefined symbol: _ZTIN4Foam36conditionDrivenWritingFunctionObjectE --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libsimpleSwakFunctionObjects.so"``` Last edited by wyldckat; June 28, 2015 at 16:20. Reason: merged posts that were a few minutes apart and added [CODE][/CODE]

June 28, 2015, 16:25
#9
Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,020
Blog Entries: 39
Rep Power: 109
Quote:
 Originally Posted by manju819 why swakExpression function is not working?
Quick answer: Edit the "system/controlDict" and add the library "libsimpleFunctionObjects.so" in "libs" before "libsimpleSwakFunctionObjects.so", e.g.:
Code:
```libs
(
"libsimpleFunctionObjects.so"
"libsimpleSwakFunctionObjects.so"
);```

 February 7, 2016, 04:02 #10 New Member   Afshin Bakhshi Join Date: Mar 2014 Posts: 13 Rep Power: 5 I'm using OF 3.0.1 and just installed swak4Foam 0.4.0 from here. installation process seemed to went well. but now I'm getting this error. Code: ```-> FOAM FATAL ERROR: Unknown function type swakExpression Valid functions are : 4 ( patchProbes probes sets surfaces ) From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 92. FOAM exiting``` is it about the libraries location? where should swak4Foam libraries be placed now?

February 7, 2016, 12:07
#11
Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,020
Blog Entries: 39
Rep Power: 109
Quote:
 Originally Posted by afshinb is it about the libraries location? where should swak4Foam libraries be placed now?
Quick requests:
2. Please provide the complete output from the solver.
3. Please provide what the following command gives you:
Code:
`ls -l \$FOAM_USER_LIBBIN`
__________________

February 7, 2016, 12:53
#12
New Member

Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 5
Quote:
 Originally Posted by wyldckat Quick requests: Please provide the "system/controlDict" file you're using in your case. Please provide the complete output from the solver. Please provide what the following command gives you: Code: `ls -l \$FOAM_USER_LIBBIN`
1.
Code:
``` libs (
"libsimpleSwakFunctionObjects.so"
"libswakFunctionObjects.so"
);
functions
{
liquid_COG //simpleFunctionObjects
{
type swakExpression;
valueType internalField;
setName liquidCog;
accumulations (sum);
expression "sum(pos()*alpha.water*vol())/(vol()*alpha.water)"; //works

/*# Time sum
0.01 (0.000309988 0.0903394 0.25)*/
verbose true;
outputControl outputTime;
}```
2. I'm not sure what you want.

3. it gives me this:
Code:
`ls: cannot access /home/afshin/OpenFOAM/afshin-3.0.1/platforms/linux64GccDPInt32Opt/lib: No such file or directory`
are you looking for this directory?
Code:
`/opt/openfoam30/platforms/linux64GccDPInt32Opt/lib`

February 7, 2016, 14:45
#13
Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,020
Blog Entries: 39
Rep Power: 109
Greetings Afshin,

Please keep in mind that OpenFOAM is very picky with every single detail Any missing detail can be the reason for it to not work as intended.

Quote:
 Originally Posted by afshinb 1. Code: ``` libs ( "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" ); functions { liquid_COG //simpleFunctionObjects { type swakExpression; valueType internalField; setName liquidCog; accumulations (sum); expression "sum(pos()*alpha.water*vol())/(vol()*alpha.water)"; //works /*# Time sum 0.01 (0.000309988 0.0903394 0.25)*/ verbose true; outputControl outputTime; }```
For this list, I hope the missing closing bracket is not missing from your complete "system/controlDict" file. In addition, I hope you only have a single "libs" entry. Beyond that, I don't see any specific problem.

Quote:
 Originally Posted by afshinb 2. I'm not sure what you want.
Remember what you posted in your previous post, namely post #10? Namely this:
Quote:
 Originally Posted by afshinb Code: ```-> FOAM FATAL ERROR: Unknown function type swakExpression Valid functions are :```
This is only a very small part of the output that the solver gave you on-screen. I need the complete output, so that I can confirm if there were any other diagnostics that OpenFOAM gave earlier or later.

Quote:
 Originally Posted by afshinb 3. it gives me this: Code: `ls: cannot access /home/afshin/OpenFOAM/afshin-3.0.1/platforms/linux64GccDPInt32Opt/lib: No such file or directory` are you looking for this directory? Code: `/opt/openfoam30/platforms/linux64GccDPInt32Opt/lib`
If you didn't change anything from the conventional installation instructions for swak4Foam, then I was looking for the correct directory. And it doesn't exist, then that probably means that swak4Foam did not build at all

If this diagnosis is correct, then I need the log file "log.make" that results from this command:
Code:
`./Allwmake > log.make 2>&1`
You can compress the file with this command:
Code:
`gzip < log.make > log.make.gz`

Best regards,
Bruno
__________________

February 7, 2016, 18:56
#14
New Member

Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 5
Quote:
 Originally Posted by wyldckat Greetings Afshin, Please keep in mind that OpenFOAM is very picky with every single detail Any missing detail can be the reason for it to not work as intended. For this list, I hope the missing closing bracket is not missing from your complete "system/controlDict" file. In addition, I hope you only have a single "libs" entry. Beyond that, I don't see any specific problem. Remember what you posted in your previous post, namely post #10? Namely this: This is only a very small part of the output that the solver gave you on-screen. I need the complete output, so that I can confirm if there were any other diagnostics that OpenFOAM gave earlier or later. If you didn't change anything from the conventional installation instructions for swak4Foam, then I was looking for the correct directory. And it doesn't exist, then that probably means that swak4Foam did not build at all If this diagnosis is correct, then I need the log file "log.make" that results from this command: Code: `./Allwmake > log.make 2>&1` You can compress the file with this command: Code: `gzip < log.make > log.make.gz` Then please attach the file "log.make.gz" to your next post. Best regards, Bruno
yes you are right, there was a missing closing bracket but fixing it didn't solve the problem.
is there a problem in having multiple libs entries ?

that's the complete output:
Code:
```/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 3.0.1-119cac7e8750
Exec   : interFoam
Date   : Feb 08 2016
Time   : 02:11:19
Host   : "afshin-System"
PID    : 11058
Case   : /home/afshin/Desktop/damBreak
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

--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : libsimpleSwakFunctionObjects.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : libswakFunctionObjects.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : libgroovyBC.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : libsimpleFunctionObjects.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
Create mesh for time = 0

PIMPLE: Operating solver in PISO mode

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar

Calculating field g.h

No MRF models present

No finite volume options present

DICPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0

Starting time loop

--> FOAM FATAL ERROR:
Unknown function type swakExpression

Valid functions are :

4
(
patchProbes
probes
sets
surfaces
)

From function functionObject::New(const word& name, const Time&, const dictionary&)
in file db/functionObjects/functionObject/functionObject.C at line 92.

FOAM exiting```
thank you for your kind responses.

Regards,
Afshin.
Attached Files
 make.log.gz (1.2 KB, 5 views)

February 7, 2016, 19:24
#15
Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,020
Blog Entries: 39
Rep Power: 109
Quick answer: The log file told us the whole story!
The problem is that you built swak4Foam with root powers (probably using sudo), because it tells us that one of the installation folders was this:
Code:
`/home/afshin/OpenFOAM/root-3.0.1/platforms/linux64GccDPInt32Opt/lib/`
"root-3.0.1" is not "afshin-3.0.1", which is why the libraries are not being found.

OK, let's see if I don't make a mistake in the following code... please carefully run these commands:
Code:
```cd ~/OpenFOAM
mkdir afshin-3.0.1
sudo mv root-3.0.1/* afshin-3.0.1/
sudo chown -R afshin:afshin afshin-3.0.1```
And finally, check if the folder I asked about in a previous post exists as intended with the desired libraries:
Code:
`ls -l \$FOAM_USER_LIBBIN`
If all went well, it should list the libraries we want, such as "libgroovyBC.so".

Quote:
 Originally Posted by afshinb is there a problem in having multiple libs entries ?
For example, having the following two lines in "system/controlDict" is wrong:
Code:
```libs ("libsimpleFunctionObjects.so");
libs ("libsimpleSwakFunctionObjects.so");```
It's wrong, because OpenFOAM will only read the first one. Therefore, the correct way is something this:
Code:
`libs ("libsimpleFunctionObjects.so" "libsimpleSwakFunctionObjects.so" );`

February 8, 2016, 09:16
#16
New Member

Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 5
Quote:
 Originally Posted by wyldckat Quick answer: The log file told us the whole story! The problem is that you built swak4Foam with root powers (probably using sudo), because it tells us that one of the installation folders was this: Code: `/home/afshin/OpenFOAM/root-3.0.1/platforms/linux64GccDPInt32Opt/lib/` "root-3.0.1" is not "afshin-3.0.1", which is why the libraries are not being found. OK, let's see if I don't make a mistake in the following code... please carefully run these commands: Code: ```cd ~/OpenFOAM mkdir afshin-3.0.1 sudo mv root-3.0.1/* afshin-3.0.1/ sudo chown -R afshin:afshin afshin-3.0.1``` And finally, check if the folder I asked about in a previous post exists as intended with the desired libraries: Code: `ls -l \$FOAM_USER_LIBBIN` If all went well, it should list the libraries we want, such as "libgroovyBC.so". For example, having the following two lines in "system/controlDict" is wrong: Code: ```libs ("libsimpleFunctionObjects.so"); libs ("libsimpleSwakFunctionObjects.so");``` It's wrong, because OpenFOAM will only read the first one. Therefore, the correct way is something this: Code: `libs ("libsimpleFunctionObjects.so" "libsimpleSwakFunctionObjects.so" );`
That did the job.
thank you for your kind help.
but I can't get my code to work:

Code:
```functions
{
liquid_COG //simpleFunctionObjects
{
type swakExpression;
valueType internalField;
setName liquidCog;
accumulations (sum);
expression "sum(pos()*alpha.water*vol())/(vol()*alpha.water)";
verbose true;
outputControl outputTime;
}
}```
do you have any idea about it?
Code:
```Create time

Create mesh for time = 0

PIMPLE: Operating solver in PISO mode

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar

Calculating field g.h

No MRF models present

No finite volume options present

DICPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0

Starting time loop

--> FOAM Warning :
From function simpleFunctionObject::simpleFunctionObject
in file simpleFunctionObject/simpleFunctionObject.C at line 109
Assuming: timeStep
--> FOAM Warning :
From function simpleFunctionObject::simpleFunctionObject
in file simpleFunctionObject/simpleFunctionObject.C at line 117
Assuming: 1
swak4Foam: Setting default mesh
Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.00119048
Time = 0.00119048

PIMPLE: iteration 1
smoothSolver:  Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0
Phase-1 volume fraction = 0.130194  Min(alpha.water) = 0  Max(alpha.water) = 1
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.130194  Min(alpha.water) = 0  Max(alpha.water) = 1
DICPCG:  Solving for p_rgh, Initial residual = 1, Final residual = 0.00312205, No Iterations 1
time step continuity errors : sum local = 0.000863557, global = 1.26712e-12, cumulative = 1.26712e-12
DICPCG:  Solving for p_rgh, Initial residual = 0.00146358, Final residual = 6.1835e-05, No Iterations 13
time step continuity errors : sum local = 3.64891e-05, global = 1.00147e-05, cumulative = 1.00147e-05
DICPCG:  Solving for p_rgh, Initial residual = 5.08691e-05, Final residual = 8.19239e-08, No Iterations 48
time step continuity errors : sum local = 5.88452e-08, global = -1.01668e-08, cumulative = 1.00045e-05
ExecutionTime = 0.19 s  ClockTime = 1 s

Expression liquid_COG : swak4Foam: Allocating new repository for sampledMeshes
swak4Foam: Allocating new repository for sampledGlobalVariables
--> FOAM Warning :
From function ConcretePluginFunction<DriverType>::exists
in file lnInclude/ConcretePluginFunction.C at line 121
Constructor table of plugin functions for FieldValueExpressionDriver is not initialized

--> FOAM FATAL ERROR:
Parser Error for driver FieldValueExpressionDriver at "1.11-15" :"field alpha not existing or of wrong type"
"sum(pos()*alpha.water*vol())/(vol()*alpha.water)"
^^^^^
------------|

Context of the error:

- From dictionary: /home/afshin/Desktop/damBreak/system/controlDict.functions.liquid_COG
Evaluating expression "sum(pos()*alpha.water*vol())/(vol()*alpha.water)"

From function parsingValue
in file lnInclude/CommonValueExpressionDriverI.H at line 1204.

FOAM exiting```

 February 14, 2016, 17:02 #17 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 10,020 Blog Entries: 39 Rep Power: 109 Quick answer: "alpha.water" problem... that has to do with a problem that swak4Foam has with field names that have dots in their names. Googling... results: vsammartano and afshinb like this.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post riesotto OpenFOAM 50 May 26, 2014 01:47 hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56 feng_w OpenFOAM Installation 1 January 25, 2009 07:59 ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50 liugx212 OpenFOAM Running, Solving & CFD 0 November 18, 2005 19:27

All times are GMT -4. The time now is 03:15.