CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Adding side force to forceCoeffs.C

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

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2011, 09:53
Default Adding side force to forceCoeffs.C
  #1
Member
 
Daniel
Join Date: Apr 2010
Location: Manchester
Posts: 30
Rep Power: 15
drrbradford is on a distinguished road
I have edited forceCoeffs.C to include side forces by basically copying the dragDig, dragForce etc entries and adding an additional line with sfDir and sideForce. When I have recompiled forceCoeffs and added a sfDir option to my controlDict it gives no output for lift, drag nor side force.

An example of how I have edited the forceCoeffs.C:

Code:
        scalar liftForce = totForce & liftDir_;
        scalar dragForce = totForce & dragDir_;
        scalar sideForce = totForce & sfDir_;
        scalar pitchMoment = totMoment & pitchAxis_;

        scalar Cl = liftForce/(Aref_*pDyn);
        scalar Cd = dragForce/(Aref_*pDyn);
        scalar Cy = sideForce/(Aref_*pDyn);
        scalar Cm = pitchMoment/(Aref_*lRef_*pDyn);
forceCoeffs works based on the totForce value so I don't need to edit the forces function, right? I take it I need to make some changes in the included .H files but I can't see any references to lift or drag except in forceCoeffs.C.

Any help is appreciated,
Daniel.
rafiee.ad likes this.
drrbradford is offline   Reply With Quote

Old   September 28, 2011, 11:24
Default
  #2
Member
 
Daniel
Join Date: Apr 2010
Location: Manchester
Posts: 30
Rep Power: 15
drrbradford is on a distinguished road
I made a typo in the .C file which I have corrected and now it works. Sorry about that.

For anyone interested, the new forceCoeffs.C is below and all you have to do is add a sfDir specification in the functions subdict of the controlDict file.

Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.

\*---------------------------------------------------------------------------*/

#include "forceCoeffs.H"
#include "dictionary.H"
#include "Time.H"
#include "Pstream.H"

// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

defineTypeNameAndDebug(Foam::forceCoeffs, 0);


// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //

Foam::forceCoeffs::forceCoeffs
(
    const word& name,
    const objectRegistry& obr,
    const dictionary& dict,
    const bool loadFromFiles
)
:
    forces(name, obr, dict, loadFromFiles),
    liftDir_(vector::zero),
    dragDir_(vector::zero),
    sfDir_(vector::zero),
    pitchAxis_(vector::zero),
    magUInf_(0.0),
    lRef_(0.0),
    Aref_(0.0)
{
    read(dict);
}


// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //

Foam::forceCoeffs::~forceCoeffs()
{}


// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //

void Foam::forceCoeffs::read(const dictionary& dict)
{
    if (active_)
    {
        forces::read(dict);

        // Directions for lift and drag forces, and pitch moment
        dict.lookup("liftDir") >> liftDir_;
        dict.lookup("dragDir") >> dragDir_;
        dict.lookup("sfDir") >> sfDir_;
        dict.lookup("pitchAxis") >> pitchAxis_;

        // Free stream velocity magnitude
        dict.lookup("magUInf") >> magUInf_;

        // Reference length and area scales
        dict.lookup("lRef") >> lRef_;
        dict.lookup("Aref") >> Aref_;
    }
}


void Foam::forceCoeffs::writeFileHeader()
{
    if (forcesFilePtr_.valid())
    {
        forcesFilePtr_()
            << "# Time" << tab << "Cd" << tab << "Cl" << tab << "Cy" << tab << "Cm" << endl;
    }
}


void Foam::forceCoeffs::execute()
{
    // Do nothing - only valid on write
}


void Foam::forceCoeffs::end()
{
    // Do nothing - only valid on write
}


void Foam::forceCoeffs::write()
{
    if (active_)
    {
        // Create the forces file if not already created
        makeFile();

        forcesMoments fm = forces::calcForcesMoment();

        scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_;

        vector totForce = fm.first().first() + fm.first().second();
        vector totMoment = fm.second().first() + fm.second().second();

        scalar liftForce = totForce & liftDir_;
        scalar dragForce = totForce & dragDir_;
        scalar sideForce = totForce & sfDir_;
        scalar pitchMoment = totMoment & pitchAxis_;

        scalar Cl = liftForce/(Aref_*pDyn);
        scalar Cd = dragForce/(Aref_*pDyn);
        scalar Cy = sideForce/(Aref_*pDyn);
        scalar Cm = pitchMoment/(Aref_*lRef_*pDyn);

        if (Pstream::master())
        {
            forcesFilePtr_()
                << obr_.time().value() << tab
                << Cd << tab << Cl << tab << Cy << tab << Cm << endl;

            if (log_)
            {
                Info<< "forceCoeffs output:" << nl
                    << "    Cd = " << Cd << nl
                    << "    Cl = " << Cl << nl
                    << "    Cy = " << Cy << nl
                    << "    Cm = " << Cm << nl
                    << endl;
            }
        }
    }
}


// ************************************************************************* //
drrbradford is offline   Reply With Quote

Old   October 29, 2012, 03:12
Default
  #3
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 13
Rider is on a distinguished road
Hi all,

I'm interested by the new forceCoeffs.C file.

I try to test it but it don't works.

I updated the forceCoeffs.C, then I added sfDir line in the forceCoeffs file. Finally, I recompile OpenFOAM. What is wrong with the method?

Thanks for your explanation
Rider is offline   Reply With Quote

Old   October 30, 2012, 04:21
Default
  #4
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 13
Rider is on a distinguished road
No suggestion ?
Rider is offline   Reply With Quote

Old   November 4, 2012, 06:49
Default
  #5
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
Hi Rider,

Attached is the adapted code based on drrbradford's modifications. The main difference is only how the modifications were made:
  1. I first made a copy of the library "$FOAM_SRC/postProcessing/functionObjects/forces" onto my personal user folder:
    Code:
    cd $FOAM_RUN
    cd ..
    cp -r $FOAM_SRC/postProcessing/functionObjects/forces forceDirCoeffs
  2. Removed the excess folders in this new folder "forceDirCoeffs" and renamed "forceCoeffs" folder inside it, leaving this way only two folders:
    Code:
    forceDirCoeffs
    Make
  3. Edited "Make/files" and this is what's inside it now:
    Code:
    forceDirCoeffs/forceDirCoeffs.C
    forceDirCoeffs/forceDirCoeffsFunctionObject.C
    
    LIB = $(FOAM_USER_LIBBIN)/libforceDirCoeffs
  4. Edited "Make/options" and made it depend/include the original function object library, since there are things we need from it (I think...):
    Code:
    EXE_INC = \
        -I$(LIB_SRC)/finiteVolume/lnInclude \
        -I$(LIB_SRC)/meshTools/lnInclude \
        -I$(LIB_SRC)/sampling/lnInclude \
        -I$(LIB_SRC)/transportModels \
        -I$(LIB_SRC)/turbulenceModels \
        -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
        -I$(LIB_SRC)/postProcessing/functionObjects/forces/lnInclude
    
    LIB_LIBS = \
        -lincompressibleTransportModels \
        -lincompressibleRASModels \
        -lincompressibleLESModels \
        -lbasicThermophysicalModels \
        -lspecie \
        -lcompressibleRASModels \
        -lcompressibleLESModels \
        -lfiniteVolume \
        -lmeshTools \
        -lsampling \
        -lforces
  5. Renamed all files inside the sub-folder "forceDirCoeffs", adding "Dir" after "force".
  6. Edited all of the renamed files and did the same search and replace of "forceCoeffs" to "forceDirCoeffs".
  7. Finally added the modifications described in the first two posts.
To build it:
Code:
wmake libso
To use it:
  1. Instead of referring to the library "libforces.so", you now refer to "libforceDirCoeffs.so".
  2. Instead of "forceCoeffs" in the case's "controlDict" file, you now use "forceDirCoeffs". Keep in mind that you now also have a vector entry named "sfDir".
I haven't tested this, so I can only assume that it works


Best regards,
Bruno
Attached Files
File Type: gz forceDirCoeffs.tar.gz (2.9 KB, 69 views)
__________________
wyldckat is offline   Reply With Quote

Old   November 5, 2012, 04:48
Default
  #6
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 13
Rider is on a distinguished road
Thank you for this work and your time.

When I used "wmake" or "sudo bash ./Allmake" in the directory "functionObjects", I had this error message "wmake : command not found"

What is the problem ?

Thanks all.
Rider is offline   Reply With Quote

Old   November 5, 2012, 04:54
Default
  #7
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
Hi Rider,

Unpack the package in a user folder of yours, not in OpenFOAM's source code folder!

And use:
Code:
wmake libso
for building the contents of the previously attached package!

To get a better understanding of what I'm talking/writing about, perhaps you should study a bit this tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 5, 2012, 06:19
Default
  #8
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 13
Rider is on a distinguished road
Hi Bruno,

I had misunderstood the structure of the modification ... It works.

I will test it now

Thanks a lot !
Rider is offline   Reply With Quote

Old   September 30, 2013, 07:22
Exclamation Error in compiling utility
  #9
Senior Member
 
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13
himanshu28 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Rider,

Attached is the adapted code based on drrbradford's modifications. The main difference is only how the modifications were made:
  1. I first made a copy of the library "$FOAM_SRC/postProcessing/functionObjects/forces" onto my personal user folder:
    Code:
    cd $FOAM_RUN
    cd ..
    cp -r $FOAM_SRC/postProcessing/functionObjects/forces forceDirCoeffs
  2. Removed the excess folders in this new folder "forceDirCoeffs" and renamed "forceCoeffs" folder inside it, leaving this way only two folders:
    Code:
    forceDirCoeffs
    Make
  3. Edited "Make/files" and this is what's inside it now:
    Code:
    forceDirCoeffs/forceDirCoeffs.C
    forceDirCoeffs/forceDirCoeffsFunctionObject.C
    
    LIB = $(FOAM_USER_LIBBIN)/libforceDirCoeffs
  4. Edited "Make/options" and made it depend/include the original function object library, since there are things we need from it (I think...):
    Code:
    EXE_INC = \
        -I$(LIB_SRC)/finiteVolume/lnInclude \
        -I$(LIB_SRC)/meshTools/lnInclude \
        -I$(LIB_SRC)/sampling/lnInclude \
        -I$(LIB_SRC)/transportModels \
        -I$(LIB_SRC)/turbulenceModels \
        -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
        -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
        -I$(LIB_SRC)/postProcessing/functionObjects/forces/lnInclude
    
    LIB_LIBS = \
        -lincompressibleTransportModels \
        -lincompressibleRASModels \
        -lincompressibleLESModels \
        -lbasicThermophysicalModels \
        -lspecie \
        -lcompressibleRASModels \
        -lcompressibleLESModels \
        -lfiniteVolume \
        -lmeshTools \
        -lsampling \
        -lforces
  5. Renamed all files inside the sub-folder "forceDirCoeffs", adding "Dir" after "force".
  6. Edited all of the renamed files and did the same search and replace of "forceCoeffs" to "forceDirCoeffs".
  7. Finally added the modifications described in the first two posts.
To build it:
Code:
wmake libso
To use it:
  1. Instead of referring to the library "libforces.so", you now refer to "libforceDirCoeffs.so".
  2. Instead of "forceCoeffs" in the case's "controlDict" file, you now use "forceDirCoeffs". Keep in mind that you now also have a vector entry named "sfDir".
I haven't tested this, so I can only assume that it works


Best regards,
Bruno
Hi Bruno ,

First off all thanks for the utility, But i am not able to build it properly on my system i am following quoted steps you have provided but its giving me some error. given below.

Code:
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file forceDirCoeffs/forceDirCoeffs.C
could not open file writer.H for source file forceDirCoeffs/forceDirCoeffs.C
Making dependency list for source file forceDirCoeffs/forceDirCoeffsFunctionObject.C
could not open file writer.H for source file forceDirCoeffs/forceDirCoeffsFunctionObject.C
SOURCE=forceDirCoeffs/forceDirCoeffs.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam221/src/finiteVolume/lnInclude -I/opt/openfoam221/src/meshTools/lnInclude -I/opt/openfoam221/src/sampling/lnInclude -I/opt/openfoam221/src/transportModels -I/opt/openfoam221/src/turbulenceModels -I/opt/openfoam221/src/turbulenceModels/LES/LESdeltas/lnInclude -I/opt/openfoam221/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam221/src/postProcessing/functionObjects/forces/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/forceDirCoeffs.o
In file included from forceDirCoeffs/forceDirCoeffs.H:40:0,
                 from forceDirCoeffs/forceDirCoeffs.C:26:
/opt/openfoam221/src/postProcessing/functionObjects/forces/lnInclude/forces.H:115:20: fatal error: writer.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/forceDirCoeffs.o] Error 1
Since i am new to OpenFoam please help me with that. i tried to locate the writer.H and found it in "src/fileFormate/lnInclude" i tried to copy that to the lnInclude provided inside your provide utility. so the error posted above was removed but. a new error came posted below
Code:
Making dependency list for source file forceDirCoeffs/forceDirCoeffs.C
Making dependency list for source file forceDirCoeffs/forceDirCoeffsFunctionObject.C
SOURCE=forceDirCoeffs/forceDirCoeffs.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -O2 -no-prec-div  -DNoRepository -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/finiteVolume/lnInclude -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/meshTools/lnInclude -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/sampling/lnInclude -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/transportModels -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/turbulenceModels -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/turbulenceModels/LES/LESdeltas/lnInclude -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/thermophysicalModels/basic/lnInclude -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/postProcessing/functionObjects/forces/lnInclude -IlnInclude -I. -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/OpenFOAM/lnInclude -I/opt/app/OpenFOAM/OpenFOAM-2.2.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64IccDPOpt/forceDirCoeffs.o
forceDirCoeffs/forceDirCoeffs.C(33): error: name followed by "::" must be a class or namespace name
  defineTypeNameAndDebug(Foam::forceDirCoeffs, 0);
  ^

forceDirCoeffs/forceDirCoeffs.C(33): error: name followed by "::" must be a class or namespace name
  defineTypeNameAndDebug(Foam::forceDirCoeffs, 0);
  ^

forceDirCoeffs/forceDirCoeffs.C(33): error #303: explicit type is missing ("int" assumed)
  defineTypeNameAndDebug(Foam::forceDirCoeffs, 0);
  ^

forceDirCoeffs/forceDirCoeffs.C(33): error: expected a ";"
  defineTypeNameAndDebug(Foam::forceDirCoeffs, 0);
  ^

forceDirCoeffs/forceDirCoeffs.C(33): error: name followed by "::" must be a class or namespace name
  defineTypeNameAndDebug(Foam::forceDirCoeffs, 0);
  ^

forceDirCoeffs/forceDirCoeffs.C(33): error: name followed by "::" must be a class or namespace name
  defineTypeNameAndDebug(Foam::forceDirCoeffs, 0);
  ^

forceDirCoeffs/forceDirCoeffs.C(91): error: identifier "forcesFilePtr_" is undefined
      if (forcesFilePtr_.valid())
          ^

forceDirCoeffs/forceDirCoeffs.C(116): error: identifier "makeFile" is undefined
          makeFile();
          ^

forceDirCoeffs/forceDirCoeffs.C(118): error: identifier "forcesMoments" is undefined
          forcesMoments fm = forces::calcForcesMoment();
          ^

forceDirCoeffs/forceDirCoeffs.C(137): error: identifier "forcesFilePtr_" is undefined
              forcesFilePtr_()
              ^

compilation aborted for forceDirCoeffs/forceDirCoeffs.C (code 2)
make: *** [Make/linux64IccDPOpt/forceDirCoeffs.o] Error 2
So i am not able to figure out how to debug this error it will be helpful if you can give some advice.
Thank you
Regards
Himanshu Sharma
himanshu28 is offline   Reply With Quote

Old   October 1, 2013, 07:32
Default
  #10
New Member
 
ThienMa
Join Date: Sep 2013
Posts: 8
Rep Power: 12
luuhoangthien is on a distinguished road
Hi himanshu28

I Know this error, in the terminal you go to this folder and type follow me:

Quote:
wclean
it will delete deb file
and now you type:

Quote:
wmake libso
don't miss libso :P

Thien

Last edited by luuhoangthien; October 2, 2013 at 14:54.
luuhoangthien is offline   Reply With Quote

Old   October 2, 2013, 04:46
Smile Thanks
  #11
Senior Member
 
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13
himanshu28 is on a distinguished road
Quote:
Originally Posted by luuhoangthien View Post
Hi himanshu28

I Know this error, in the terminal you go to this folder and type follow me:

if will delete deb file
and now you type:

don't miss libso :P

Thien
Thanks for the reply luuhoangthien it now worked..

Regards
Himanshu
himanshu28 is offline   Reply With Quote

Old   January 13, 2014, 11:58
Default
  #12
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 13
Rider is on a distinguished road
Hi Bruno,

I try to add the modification to the OF V222, but i don't succeed.

I always have this error : "unknown function type force DirCoeffs".

When I add the modification like the previous OF version, I don't have error message, but the modification seems to not be affect.

Thank you in advance !
Rider is offline   Reply With Quote

Old   January 13, 2014, 17:33
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
Hi Rider,

I won't have much time to look deeper into this before the weekend.

But one question: did you also try in OpenFOAM 2.2.1?

Either way, OpenFOAM 2.2 has been evolving on the function objects topic quite a bit, adding new features to them for 2.2.1, 2.2.2 and 2.2.x, so things have continued to change.
So it really depends on what was the starting point you've used to make the code modifications.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 14, 2014, 04:46
Default
  #14
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 13
Rider is on a distinguished road
Hi Bruno,

Thanks for your quick reply.

Yes, I have tried with the OF V221. The problem is the same.
I used your methode with the forceDirCoeff file.


Best regards.
Rider is offline   Reply With Quote

Old   January 26, 2014, 13:28
Default
  #15
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
Hi Rider,

OK, things did change considerably in OpenFOAM 2.2. It has got binning and all!

This time I've gone through the somewhat correct steps in sharing modified code, which is provided here: https://github.com/wyldckat/forceDirCoeffs

The instructions are provided there and make sure you replace all references to "21x" to "22x", when following the installation steps.

Let me know if you have any problems following the steps or any problems using the modified library.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 6, 2014, 00:09
Default
  #16
New Member
 
Join Date: Jul 2010
Posts: 4
Rep Power: 15
gsingle is on a distinguished road
Good day Bruno,

I have followed your most recent directions in the github site. I am running simpleFoam and it seems that the program is not picking up my forceDirCoeffs directory I have compiled. In my controlDict file I have placed #include "forceDirCoeffs" into the functions.

Below is found in my simpleFoam.log file. I think there must be a problem with the functionObject.C file in the OpenFOAM222 directory but do not know how to resolve it. Any help here would be much appreciated.

Thanks,
Geoff
[6] --> FOAM FATAL ERROR:
[6] Unknown function type forceDirCoeffs

Valid functions are :

20
(
cellSource
faceSource
fieldAverage
fieldCoordinateSystemTransform
fieldMinMax
fieldValueDelta
forceCoeffs
forces
nearWallFields
patchProbes
probes
processorField
readFields
regionSizeDistribution
sets
streamLine
surfaceInterpolateFields
surfaces
turbulenceFields
wallBoundedStreamLine
)

gsingle is offline   Reply With Quote

Old   February 6, 2014, 17:57
Default
  #17
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 Geoff,

Quote:
Originally Posted by gsingle View Post
In my controlDict file I have placed #include "forceDirCoeffs" into the functions.
Mmm... I see that I need to provide clearer instructions on the README file...

The idea is that you should add the following line to the "controlDict" file:
Code:
libs (libforceDirCoeffs.so);
In case you already have a line that starts with "libs", then add the library name to the list, for example:
If you have this:
Code:
libs (
    libforces.so
);
It becomes this:
Code:
libs (
    libforces.so
    libforceDirCoeffs.so
);
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 8, 2014, 17:45
Default
  #18
New Member
 
Join Date: Jul 2010
Posts: 4
Rep Power: 15
gsingle is on a distinguished road
Thanks again for the help. I am running OpenFOAM 2.2.2. I did have to do one additional thing to the files I cloned from your github. Before the wmake command, I had to add lforces to the Make/options file, as seen below.

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/postProcessing/functionObjects/forces/lnInclude

LIB_LIBS = \
-lincompressibleTransportModels \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfluidThermophysicalModels \
-lspecie \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume \
-lmeshTools \
-lforces \
-lfileFormats

Works great now, I actually added a few terms, to give coefficients in all three directions in global coordinates as well as all three directions of local coordinates to the body being analysed.
wyldckat likes this.
gsingle is offline   Reply With Quote

Old   February 16, 2014, 13:43
Default
  #19
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
Hi Geoff,

I've updated the repository, regarding the README file and the linking to "libforces" as you indicated.
Do feel free to clone the repository and publish your modifications to it!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 27, 2014, 10:13
Default
  #20
New Member
 
Join Date: Jul 2010
Posts: 4
Rep Power: 15
gsingle is on a distinguished road
Let me finish my masters project first, then I will be more than happy to tidy up and post the updates. Just three more weeks!
wyldckat likes this.
gsingle 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
Force can not converge colopolo CFX 13 October 4, 2011 23:03
How to measure side force and yawing moment firda FLUENT 0 November 3, 2010 03:33
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36
CFX Solver Memory Error mike CFX 1 March 19, 2008 08:22
[Commercial meshers] Converting meshes that includes interfaces ham OpenFOAM Meshing & Mesh Conversion 29 January 8, 2007 09:58


All times are GMT -4. The time now is 14:25.