CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc (https://www.cfd-online.com/Forums/openfoam-community-contributions/99168-groovybc-openfoam-2-0-parabolic-velocity-bc.html)

linch August 26, 2013 04:27

1 Attachment(s)
The version was 0.2.3 (next to last according to Swak4Foam-Wiki) and suitable to OF up to 2.2 (2.1 is the one I use).

Now I've got v0.2.4 (release, available via svn, must be the latest one), but the errors are still there.

There are also a couple of other error related to openmpi (see attachment for the full log)
Code:

/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Waitall'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Abort'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_double'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Get_count'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Init'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Probe'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Send'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Allreduce'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_packed'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Buffer_detach'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Bsend'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_byte'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Irecv'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Recv'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_comm_world'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Get_processor_name'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Test'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Isend'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Finalize'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_op_sum'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Buffer_attach'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Comm_size'
/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Comm_rank'

. Somehow, swak is looking for the "OF-internal" openmpi, while an external is used. I think I'm missing something.

Best regards,
Ilya

gschaider August 26, 2013 07:02

Quote:

Originally Posted by linch (Post 448039)
The version was 0.2.3 (next to last according to Swak4Foam-Wiki) and suitable to OF up to 2.2 (2.1 is the one I use).

Now I've got v0.2.4 (release, available via svn, must be the latest one), but the errors are still there.

There are also a couple of other error related to openmpi (see attachment for the full log)
Code:

/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Waitall'
. Somehow, swak is looking for the "OF-internal" openmpi, while an external is used. I think I'm missing something.

Best regards,
Ilya

Have you ever tried compiling other software than swak with that installation? Because it seems that this is a problem with the installation, not swak. swak doesn't specify which MPI to use but uses the options that wmake automatically generates (have a look for instance at Utilities/replayTransientBC/Make/options - that is one of the links that is failing and it uses only standard-options).

What version of Linux are you using?

linch August 26, 2013 11:06

Thanks Bernhard,

the problem was indeed somewhere else. I was looking for it for a while with our admin, who takes care of the cluster. Finally, his conclusion was that the openmpi installed on the cluster was compiled with intel compiler while OF uses gcc. However, compiling ThirdPartys and src's caused no errors, these errors occurred only while compiling some application and swak4foam. After recompiling the openmpi with gcc, everything was ok.

Nevertheless, the warnings
Quote:

could not open file [...] for source file [...]
are still there. But since there are no errors, I think it's ok.

Thank you for the hints and best regards,
Ilya

bufs July 10, 2015 09:44

groovyBC problems
 
Hi guys,


it's my first time using groovyBC and I'm trying to set up a parabolic profile of inlet velocity. What I'm doing is editing the U file to have the following code for inlet

Code:

inlet
    {
        type              groovyBC;
    variables          "yp = pts().y; minY = min(yp); maxY = max(yp); rad = 0.5*(maxY - minY); vavg = 0.23;";
    valueExpression    "2.0*vavg*(1.0-pow(pos().y/rad, 2))*normal()";
    value              uniform (10 0 0);
    }

and also I edited the controlDict file in system to include

Code:

libs ("libOpenFOAM.so"
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
      "libgroovyBC.so"
);

But, when I run the case I get the following message

Code:

Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: displacementSBRStress
Selecting motion diffusion: inverseDistance
Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Reading field rAU if present

No field sources present


PIMPLE: no residual control data found. Calculations will employ 2 corrector loops


Starting time loop

Courant Number mean: 0.00054139691 max: 0.023902054
deltaT = 0.00011990408
Time = 0.00011990408

DICPCG:  Solving for cellDisplacementx, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG:  Solving for cellDisplacementy, Initial residual = 0, Final residual = 0, No Iterations 0
word::stripInvalid() called for word yp
    For debug level (= 2) > 1 this is considered fatal
Aborted (core dumped)

Anyone knows what I'm doing wrong?

Navip August 23, 2015 22:41

Hi Bernhard,

I use openfoam/2.3.0 on a virtual machine (MASSIVE). I try to implement a zero flux condition via swaf4foam. I have swak4foam/2.3.0. I guess it is well installed as the answer to the command module show swak4foam/2.3.0

-------------------------------------------------------------------
/usr/local/Modules/modulefiles/swak4foam/2.3.0:

conflict swak4foam
module load openfoam/2.3.0
module load bison
module-whatis An OpenFOAM library that combines the functionality of groovyBC (boundary conditions) and funkySetFields (set fields) (v2.3.0)
prepend-path LD_LIBRARY_PATH /usr/local/swak4foam/2.3.0/lib
prepend-path PATH /usr/local/swak4foam/2.3.0/bin
prepend-path MANPATH /usr/local/swak4foam/2.3.0/man
setenv GCONV_PATH /usr/lib64/gconv/
setenv SWAK4FOAM_SRC /usr/local/swak4foam/2.3.0/Libraries
-------------------------------------------------------------------





So the installation seems to be complete. When I try to set up the path of the plug-in

libs (
"libgroovyBC.so"
);

I have a FOAM:WARNING

--> 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
could not load "libgroovyBC.so"

The foam warning doesn't stop the program as this isn't a fatal error. But I need to use this groovyBC for my boundary condition. My boundary condition is:

upperWall
{
type groovyBC;
value uniform (0 0 0);
valueExpression "0.001*T-DT*fvc::snGrad(T)"
}

And as expected I now have a fatal error:

--> FOAM FATAL IO ERROR:
Unknown patchField type groovyBC for patch type patch

Valid patchField types are :.......


Do you have any idea how I can solve this problem? Why do I receive a foam warning for the .so file while swak4foam is apparently well installed.

smodh March 6, 2017 10:03

groovyBC or codedfixedValue
 
Hello Foamers,

I want to implement a boundary condition at electrode.

N_P= K * Efield * N_P

I am solving following equation with modified pisoFoam.

(fvm::ddt(N_P)) + (fvm::div(phi+(K*Efield), N_P))

and for the electrode, I have to implent following BC, N_P = K * Efield * N_P.
so my BC condition will change with every time step.

In this equation N_P and Efield " need to be taken from electrode at previous time step and K is dimensionedScalar fix value 1.

Should I have to used codedfixed BC or some other BC? I have also trying groovyBC but I am failed.
is there anyone know how to implemrnt this BC?
Thanks in advance.


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