CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Post-Processing

outputTime in Swak function

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

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   May 19, 2013, 05:54
Default outputTime in Swak function
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   May 19, 2013, 07:38
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
wyldckat is offline   Reply With Quote

Old   May 19, 2013, 07:53
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   May 19, 2013, 08:00
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
immortality likes this.
wyldckat is offline   Reply With Quote

Old   May 19, 2013, 17:47
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
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 View Post
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
gschaider is offline   Reply With Quote

Old   May 20, 2013, 04:53
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   May 20, 2013, 06:43
Default
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
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 View Post
(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
gschaider is offline   Reply With Quote

Old   June 24, 2015, 07:13
Default
  #8
Member
 
Manjunath Reddy
Join Date: Jun 2013
Posts: 34
Rep Power: 4
manju819 is on a distinguished road
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]
manju819 is offline   Reply With Quote

Old   June 28, 2015, 16:25
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quote:
Originally Posted by manju819 View Post
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"
);
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 07:59
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
Please help about the VTKFoam liugx212 OpenFOAM Running, Solving & CFD 0 November 18, 2005 19:27


All times are GMT -4. The time now is 09:30.