CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] I have warning in use swak4Foam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2013, 07:27
Default I have warning in use swak4Foam
  #1
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
Dear foamer
I want use this code for calculate droplet velocity but I dont kwon any thing.I dont know I must how use it?
its:

downAverage
{
type swakExpression;
valueType internalField;
variables (
"downDirection=vector(0,-1,0);"//select the downwards direction
"thres=0.5;"//which cells to keep
"liquidVol=sum(alpha1>thres ? vol() : 0);" //calculates the volume of the drop
"downVel=alpha1>thres ? (U & downDirection) : 0;" //a & b:inner vector product. Keep the y component of U. );
expression "downVel*vol()/liquidVol" //vol():vol of the cell
accumulations ( sum ); verbose true;
}


please help me. I dont know any thing about use swak4Foam,I just found this code in wiki.
http://www.openfoamwiki.net/index.ph...ropletVelocity
seju is offline   Reply With Quote

Old   October 19, 2013, 07:56
Default I have warning in use swak4Foam
  #2
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
dear foamer
I have compiled swak4Foam 0.2.4 on openFoam 2.2.1;
I want calculate the velocity of bubble or droplet. I added this code to controlDict:
Code:
libs (
"libOpenFOAM.so"
"libsimpleSwakFunctionObjects.so"
"libswakFunctionObjects.so"
"libgroovyBC.so"
);
downAverage
{
type swakExpression;
valueType internalField;
variables (
"downDirection=vector(0,-1,0);"//select the downwards direction
"thres=0.5;"//which cells to keep
"liquidVol=sum(alpha1>thres ? vol() : 0);" //calculates the volume of the drop
"downVel=alpha1>thres ? (U & downDirection) : 0;" //a & b:inner vector product. Keep the y component of U.
);
expression "downVel*vol()/liquidVol";//vol():vol of the cell
accumulations (
sum
);

verbose true;
}
after that in terminal I saw these warning and I dont see change in my simulation.
what do I do?????
warnings are:

Code:
sajad@sajad-K55VD:~/OpenFOAM/sajad-2.2.1/run/tutorials/multiphase/interFoam/laminar/c4$ cp -r 0/alpha1.org 0/alpha1 
sajad@sajad-K55VD:~/OpenFOAM/sajad-2.2.1/run/tutorials/multiphase/interFoam/laminar/c4$ setFields
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.1-57f3c3617a2d
Exec : setFields
Date : Oct 20 2013
Time : 15:03:08
Host : "sajad-K55VD"
PID : 7262
Case : /home/sajad/OpenFOAM/sajad-2.2.1/run/tutorials/multiphase/interFoam/laminar/c4
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

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libsimpleSwakFunctionObjects.so"
--> 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:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libswakFunctionObjects.so"
Create mesh for time = 0

Reading setFieldsDict

Setting field default values
Setting internal values of volScalarField alpha1

Setting field region values
Adding cells with centre within sphere, with centre = (0.21 0.185 0) and radius = 0.0098474
Setting internal values of volScalarField alpha1

End

sajad@sajad-K55VD:~/OpenFOAM/sajad-2.2.1/run/tutorials/multiphase/interFoam/laminar/c4$ interFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.1-57f3c3617a2d
Exec : interFoam
Date : Oct 20 2013
Time : 15:03:17
Host : "sajad-K55VD"
PID : 7263
Case : /home/sajad/OpenFOAM/sajad-2.2.1/run/tutorials/multiphase/interFoam/laminar/c4
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

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libsimpleSwakFunctionObjects.so"
--> 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:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libswakFunctionObjects.so" 
Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

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
Calculating field g.h

No finite volume options present

time step continuity errors : sum local = 0, global = 0, cumulative = 0
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

Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.01
Time = 0.01

MULES: Solving for alpha1
Phase-1 volume fraction = 0.998911 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.998911 Min(alpha1) = 0 Max(alpha1) = 1
DICPCG: Solving for p_rgh, Initial residual = 1, Final residual = 0.0468969, No Iterations 5
time step continuity errors : sum local = 0.0186152, global = -5.5655e-20, cumulative = -5.5655e-20
DICPCG: Solving for p_rgh, Initial residual = 0.929295, Final residual = 0.0428746, No Iterations 11
time step continuity errors : sum local = 0.01934, global = -1.08697e-19, cumulative = -1.64352e-19
DICPCG: Solving for p_rgh, Initial residual = 0.674363, Final residual = 0.000234574, No Iterations 1001
time step continuity errors : sum local = 1.57286e-05, global = -6.24738e-20, cumulative = -2.26826e-19
ExecutionTime = 15.76 s ClockTime = 16 s

Courant Number mean: 0.0113272 max: 47.3745
Interface Courant Number mean: 0 max: 0
deltaT = 0.000105541
Time = 0.0101055

Last edited by wyldckat; October 19, 2013 at 16:55. Reason: Changed [QUOTE] to [CODE][/CODE]
seju is offline   Reply With Quote

Old   October 19, 2013, 17:01
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings seju,

It looks like swak4Foam did not build properly. Run this command to check if the desired library file exists:
Code:
ls -l $FOAM_USER_LIBBIN/
If it indicates that there is no such folder or if the folder is empty, then swak4Foam did not build as it was meant to. The correct content should show you at least the file "libswak4FoamParsers.so".

I do suspect that you built swak4Foam as root, which would explain why now you do not have it installed as normal user.
But just in case, please explain how exactly you installed swak4Foam.

Best regards,
Bruno

PS: Please read the instructions from the second link on my signature

edit: I've merged your other thread with this one, namely the first post is from your older thread. This way all can be in the same topic regarding this issue.
__________________

Last edited by wyldckat; October 19, 2013 at 17:04. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   October 19, 2013, 18:04
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by seju View Post
dear foamer
I have compiled swak4Foam 0.2.4 on openFoam 2.2.1;
I want calculate the velocity of bubble or droplet. I added this code to controlDict:



after that in terminal I saw these warning and I dont see change in my simulation.
what do I do?????
warnings are:
Seems there was a problem with compiling swak and there is no libsimpleSwakFunctionObjects.so in FOAM_USER_LIBBIN
__________________
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   October 19, 2013, 20:57
Default
  #5
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
oh,no,oh my god.I run this code: sudo apt-get remove gcc
removed my openFoam.
seju is offline   Reply With Quote

Old   October 20, 2013, 03:17
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by seju View Post
I run this code: sudo apt-get remove gcc
Why would you need to run that command?
Or a better question: Why did you run that command?
__________________
wyldckat is offline   Reply With Quote

Old   October 20, 2013, 06:59
Default
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
Greetings seju,

It looks like swak4Foam did not build properly. Run this command to check if the desired library file exists:
Code:
ls -l $FOAM_USER_LIBBIN/
If it indicates that there is no such folder or if the folder is empty, then swak4Foam did not build as it was meant to. The correct content should show you at least the file "libswak4FoamParsers.so".

I do suspect that you built swak4Foam as root, which would explain why now you do not have it installed as normal user.
But just in case, please explain how exactly you installed swak4Foam.

Best regards,
Bruno

PS: Please read the instructions from the second link on my signature

edit: I've merged your other thread with this one, namely the first post is from your older thread. This way all can be in the same topic regarding this issue.
Added a note about not building as root to the Wiki-page (funny: this wasn't a problem before. Seems like the Zeitgeist is shifting towards "let's build everything as root. Don't care about security")
__________________
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   October 20, 2013, 07:04
Default
  #8
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Why would you need to run that command?
Or a better question: Why did you run that command?
beacuse I want compile openFoam 1.6 ext.
I have a problem.this error was:
Quote:
linux64Gcc47DPOpt/vorticity
make: Target `application' not remade because of errors.
I thought my gcc had problem.then I removed gcc.removed my openFoam.now I cant compile openfoam 1.6ext and openfoam 2.2.1 removed too
seju is offline   Reply With Quote

Old   October 20, 2013, 07:18
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by seju View Post
I thought my gcc had problem.then I removed gcc.removed my openFoam.now I cant compile openfoam 1.6ext and openfoam 2.2.1 removed too
Asking the right questions can get you faster to the right answers

Which Linux distribution are you using?
__________________
wyldckat is offline   Reply With Quote

Old   October 20, 2013, 07:22
Default
  #10
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Asking the right questions can get you faster to the right answers

Which Linux distribution are you using?
Im using ubuntu 13.04
seju is offline   Reply With Quote

Old   October 20, 2013, 10:18
Default
  #11
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings seju,

It looks like swak4Foam did not build properly. Run this command to check if the desired library file exists:
Code:
ls -l $FOAM_USER_LIBBIN/
If it indicates that there is no such folder or if the folder is empty, then swak4Foam did not build as it was meant to. The correct content should show you at least the file "libswak4FoamParsers.so".

I do suspect that you built swak4Foam as root, which would explain why now you do not have it installed as normal user.
But just in case, please explain how exactly you installed swak4Foam.

Best regards,
Bruno

PS: Please read the instructions from the second link on my signature

edit: I've merged your other thread with this one, namely the first post is from your older thread. This way all can be in the same topic regarding this issue.
I installed openfoam 2.2.1 and swak4Foam again,for install swak4foam:
I used this page:https://github.com/wyldckat/swak4foam/tree/OF22X
and in terminal on the openFoam folder I input:
PHP Code:
git clone https://github.com/wyldckat/swak4foam.git 
after download it I enter this:
PHP Code:
cd swak4foam 
and after that I run
PHP Code:
./Allwmake 
.After that I wait for a few min and I saw :
Quote:
nFOAM/sajad-2.2.1/platforms/linux64GccDPOpt/bin/replayTransientBC
make[1]: Leaving directory `/home/sajad/OpenFOAM/sajad-2.2.1/swak4foam/Utilities/replayTransientBC'


If you want to use swakCoded-function object or compile software based on swak set the environment variable SWAK4FOAM_SRC to /home/sajad/OpenFOAM/sajad-2.2.1/swak4foam/Libraries (most people will be fine without setting that variable)
sajad@sajad-K55VD:~/OpenFOAM/sajad-2.2.1/swak4foam$
after run this code(ls -l $FOAM_USER_LIBBIN) and I saw:
Quote:
-rwxrwxr-x 1 sajad sajad 1366353 اكتبر 21 17:18 libgroovyBC.so
-rwxrwxr-x 1 sajad sajad 579646 اكتبر 21 17:22 libgroovyStandardBCs.so
-rwxrwxr-x 1 sajad sajad 1784984 اكتبر 21 17:20 libsimpleLagrangianFunctionObjects.so
-rwxrwxr-x 1 sajad sajad 414274 اكتبر 21 17:21 libsimpleSearchableSurfaces.so
-rwxrwxr-x 1 sajad sajad 7187113 اكتبر 21 17:18 libswak4FoamParsers.so
-rwxrwxr-x 1 sajad sajad 249205 اكتبر 21 17:26 libswakChemistryModelFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 1393655 اكتبر 21 17:23 libswakFvcSchemesFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 414856 اكتبر 21 17:26 libswakLagrangianCloudSourcesFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 212460 اكتبر 21 17:22 libswakLocalCalculationsFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 234460 اكتبر 21 17:22 libswakMeshQualityFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 206642 اكتبر 21 17:26 libswakRadiationModelFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 148447 اكتبر 21 17:22 libswakRandomFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 390530 اكتبر 21 17:21 libswakSourceFields.so
-rwxrwxr-x 1 sajad sajad 1071050 اكتبر 21 17:25 libswakSurfacesAndSetsFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 348029 اكتبر 21 17:24 libswakThermoTurbFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 106535 اكتبر 21 17:21 libswakTopoSources.so
-rwxrwxr-x 1 sajad sajad 250266 اكتبر 21 17:24 libswakTransportTurbFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 242345 اكتبر 21 17:26 libswakVelocityFunctionPlugin.so
-rwxrwxr-x 1 sajad sajad 332097 اكتبر 20 20:16 libtecio.so
اکتبر==october
seju is offline   Reply With Quote

Old   October 20, 2013, 10:39
Default
  #12
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
Quote:
Originally Posted by seju View Post
I installed openfoam 2.2.1 and swak4Foam again,for install swak4foam:
I used this page:https://github.com/wyldckat/swak4foam/tree/OF22X
and in terminal on the openFoam folder I input:
PHP Code:
git clone https://github.com/wyldckat/swak4foam.git 
after download it I enter this:
PHP Code:
cd swak4foam 
and after that I run
PHP Code:
./Allwmake 
.After that I wait for a few min and I saw :


after run this code(ls -l $FOAM_USER_LIBBIN) and I saw:

اکتبر==october
I cant find funkysetFields?
seju is offline   Reply With Quote

Old   October 20, 2013, 10:49
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by seju View Post
I cant find funkysetFields?
It's in the applications folder:
Code:
ls -l $FOAM_USER_APPBIN
As for installing 1.6-ext:
  1. For being able to use more than one OpenFOAM version, read this: Advanced tips for working with the OpenFOAM shell environment
  2. To build+install 1.6-ext, follow these instructions: http://openfoamwiki.net/index.php/In...u#Ubuntu_13.04
__________________
wyldckat is offline   Reply With Quote

Old   October 21, 2013, 03:05
Default
  #14
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
dear bruno
I didnt solve my problem.I added this code in my controlDict but I dont see any change in terminal and simulation.I want calculate velocity bubble or droplet
code is:
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    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.05;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           0.5;
maxAlphaCo      0.5;

maxDeltaT       1;
      
downAverage     {     
                               
type swakExpression;          
                              
valueType internalField;       
                              
variables
                             
(         
                             
"downDirection=vector(0,-1,0);"//select the downwards direction                                  "thres=0.5;"//which cells to keep           
                             
"liquidVol=sum(alpha1>thres ? vol() : 0);" //calculates the volume of the drop       
                             
"downVel=alpha1>thres ? (U & downDirection) : 0;" //a & b:inner vector product. Keep the y component of U.   
                              
);     
                            
expression "downVel*vol()/liquidVol"//vol():vol of the cell   
                            
accumulations
                           
(           
                            
sum    
                             
);                
                             
verbose true;  
                             } 
seju is offline   Reply With Quote

Old   October 21, 2013, 04:40
Default
  #15
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by seju View Post
dear bruno
I didnt solve my problem.I added this code in my controlDict but I dont see any change in terminal and simulation.I want calculate velocity bubble or droplet
code is:
Code:
<snip>

maxCo           0.5;
maxAlphaCo      0.5;

maxDeltaT       1;
      downAverage     {     
                               type swakExpression;          
                              valueType internalField;       
                              variables
                             (         
                             "downDirection=vector(0,-1,0);"//select the downwards direction                                  "thres=0.5;"//which cells to keep           
                             "liquidVol=sum(alpha1>thres ? vol() : 0);" //calculates the volume of the drop       
                             "downVel=alpha1>thres ? (U & downDirection) : 0;" //a & b:inner vector product. Keep the y component of U.   
                              );     
                            expression "downVel*vol()/liquidVol"; //vol():vol of the cell   
</snip>
"don't see any change": as compared to what? An unmodified case? The original posting?

Anyway:the definition of function Objects should be inside the functions-list (or dictionary). The way you write it OF says "Ah. Interesting. A sub-dicitonary downAverage. Don't know what to do with it so I'll ignore it. On the other hand he didn't define a functions-dictionary. Fine. Less work for me"
__________________
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   October 21, 2013, 06:29
Default
  #16
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
Quote:
Originally Posted by gschaider View Post
"don't see any change": as compared to what? An unmodified case? The original posting?

Anyway:the definition of function Objects should be inside the functions-list (or dictionary). The way you write it OF says "Ah. Interesting. A sub-dicitonary downAverage. Don't know what to do with it so I'll ignore it. On the other hand he didn't define a functions-dictionary. Fine. Less work for me"
when I change controlDict I dont see change in terminal in other hands I dont see velocity in terminal and in simulation folder.
source code is
HTML Code:
http://openfoamwiki.net/index.php/Contrib/swak4Foam/Example_dropletVelocity
here cant see definition of function
seju is offline   Reply With Quote

Old   October 21, 2013, 10:34
Default
  #17
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by seju View Post
when I change controlDict I dont see change in terminal in other hands I dont see velocity in terminal and in simulation folder.
source code is
HTML Code:
http://openfoamwiki.net/index.php/Contrib/swak4Foam/Example_dropletVelocity
here cant see definition of function
That is right. But that snipplet assumes that you know how to use functionObjects: that such a sub-dictionary has to be inserted into the functions-dictionary (and I think it is a good thing that the author of that snipplet didn't add the enclosing functions-dictionary because that will lead to problem when people insert the second snipplet and wonder why one function-object doesn't work anymore)
__________________
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   October 23, 2013, 03:15
Default
  #18
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
dear foamer I used this code in controlDict and I have seen error.
Code:
 libs ( 
"libOpenFOAM.so"
 "libsimpleSwakFunctionObjects.so"
 "libswakFunctionObjects.so"
                  ); 
downAverage { 
type swakExpression;
 valueType internalField;
 variables (
 "downDirection=vector(0,-1,0);"//select the downwards direction  
"thres=0.5;"//which cells to keep
 "liquidVol=sum(alpha1>thres ? vol()  : 0);" //calculates the volume  of the drop "downVel=alpha1>thres ?  (U & downDirection) : 0;"  //a & b:inner vector product. Keep the  y component of U. ); 
expression
 "downVel*vol()/liquidVol";//vol():vol  of the cell accumulations ( sum ); 
 verbose true;
 }
ERROR:
PHP Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  2.2.1-57f3c3617a2d
Exec   
interFoam
Date   
Oct 24 2013
Time   
10:36:16
Host   
"sajad-K55VD"
PID    5804
Case   : /home/sajad/OpenFOAM/sajad-2.2.1/run/tutorials/multiphase/interFoam/laminar/c4
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

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

--> FOAM Warning 
    
From function dlOpen(const fileName&, const bool)
    
in file POSIX.C at line 1179
    dlopen error 
libsimpleSwakFunctionObjects.socannot open shared object fileNo such file or directory
--> 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"
--> FOAM Warning 
    
From function dlOpen(const fileName&, const bool)
    
in file POSIX.C at line 1179
    dlopen error 
libswakFunctionObjects.socannot open shared object fileNo such file or directory
--> FOAM Warning 
    
From function dlLibraryTable::open(const fileName&, const bool)
    
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load 
"libswakFunctionObjects.so"
Create mesh for time 0


PIMPLE
Operating solver in PISO mode

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
Calculating field g
.h

No finite volume options present

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

Starting time loop



--> FOAM FATAL ERROR
Unknown function type swakExpression

Valid functions are 


4
(
patchProbes
probes
sets
surfaces
)



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

FOAM exiting 
seju is offline   Reply With Quote

Old   October 23, 2013, 16:47
Default
  #19
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by seju View Post
dear foamer I used this code in controlDict and I have seen error.

ERROR:
[PHP]

--> 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:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libsimpleSwakFunctionObjects.so"
--> 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:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libswakFunctionObjects.so"
Create mesh for time = 0
Check: probably the libraries are not in your FOAM_USER_LIBBIN-directory (check with "ls $FOAM_USER_LIBBIN"). The reasons for this are usually
- swak did not compile correctly or
- you compiled it as a different user
__________________
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   October 24, 2013, 17:27
Default
  #20
Member
 
sajad
Join Date: Aug 2013
Posts: 70
Rep Power: 12
seju is on a distinguished road
my libraries are:
PHP Code:
sajad@sajad-K55VD:~$ ls $FOAM_USER_LIBBIN
libgroovyBC
.so
libgroovyStandardBCs
.so
libsimpleLagrangianFunctionObjects
.so
libsimpleSearchableSurfaces
.so
libswak4FoamParsers
.so
libswakChemistryModelFunctionPlugin
.so
libswakFvcSchemesFunctionPlugin
.so
libswakLagrangianCloudSourcesFunctionPlugin
.so
libswakLocalCalculationsFunctionPlugin
.so
libswakMeshQualityFunctionPlugin
.so
libswakRadiationModelFunctionPlugin
.so
libswakRandomFunctionPlugin
.so
libswakSourceFields
.so
libswakSurfacesAndSetsFunctionPlugin
.so
libswakThermoTurbFunctionPlugin
.so
libswakTopoSources
.so
libswakTransportTurbFunctionPlugin
.so
libswakVelocityFunctionPlugin
.so 
how can I add libraries in swak and complite swak??
I have to add these libraries to swak because I so need these libraries.
seju is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 04:06
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 08:16.