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

[swak4Foam] Installing and using swak4foam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By a_slow_old_man

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2016, 09:12
Default Installing and using swak4foam
  #1
New Member
 
Frederik
Join Date: Dec 2015
Location: Germany
Posts: 25
Rep Power: 10
a_slow_old_man is on a distinguished road
Hello cfd-online.com

I am trying to use swak4foam for a project, but I seem to miss an important step.

I use Ubuntu14.04LTS and OpenFoam2.4.0

I installed the swak4foam version for OF2.0 and higher

Code:
svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam/ swak4Foam_2.x
Then I followed these instructions:
https://openfoamwiki.net/index.php/I...14.04_to_15.10

But when I try to use this function in my controlDict
Code:
functions
{

    pressureDrop
    {
        type patchExpression;
        variables ( "pOut{patch'outlet}=sum(p*area())/sum(area());");
        accumulations (
           min
           max
        );
        patches (
            inlet
        );
        expression "p-pOut";
        verbose true;
    }
}
I get the following error

Code:
--> FOAM FATAL ERROR: 
Unknown function type patchExpression

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
I tried to fix this by following the advice from various threads about installation problems with swak4foam and added to my bashrc the line:

Code:
export SWAK4FOAM_SRC=$HOME/swak4Foam_2.x/Libraries/
but still the same.

I am relativly new to Ubuntu and openFoam. Any help is deeply appreciated
a_slow_old_man is offline   Reply With Quote

Old   June 13, 2016, 04:26
Default Solved
  #2
New Member
 
Frederik
Join Date: Dec 2015
Location: Germany
Posts: 25
Rep Power: 10
a_slow_old_man is on a distinguished road
If anyone in future has the same misconceptions as I do.

You can't just put in the functionObjects from swak4Foam in the ControlDict of a random case. You need the .libs too.

There is a folder "Examples" in the "./swak4Foam/" main folder. Pick your desired option and C&P them into your file.
t.oliveira likes this.
a_slow_old_man is offline   Reply With Quote

Reply

Tags
of240, swak4foam, ubuntu14.04


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



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