Two-way particle tracking example needed

190 views
Skip to first unread message

Nadeem Malik

unread,
Feb 7, 2021, 10:24:05 PM2/7/21
to Nek5000
Hi Neks,

After a long break, I am back on the 2-way particle tracking problem. From previous posts, I know that Nek500 v19 has this facilities, and it has its own version, and also an interface with ppiclF  (https://dpzwick.github.io/ppiclF-doc/index.html).

I have a Nek5000 example in my directory ~/short_tests/lpm_two. There I have found some files named uniform.*  However, not actual run examples -- juts the *.usr, etc files.

I am a little confused between uniform.usr and the example H-file given in dpzwick*  (PPICLF_USER.h) file: the variables for a start are named differently:

In uniform .usr, I have:

#define LPM_LPART 300 /* make it large enough to account for load imbalance */
#define LPM_LRS 6
#define LPM_JVX (LPM_JZ+1)
.....

#include "experimental/lpm.h"
c-----------------------------------------------------------------------
      subroutine userqtl
      include 'SIZE'
      include 'TOTAL'
#     include "LPM"

But in ppiclF_user.h I have:

#define PPICLF_LRS 4
#define PPICLF_LRP 6
#define PPICLF_LEE 1000
#define PPICLF_LEX 6
....

Which is to be preferred? And how do I proceed?

And I really could do with an actual example problem which I can run?

Thanks,
Nadeem 

Juan Colmenares

unread,
Feb 8, 2021, 1:51:46 PM2/8/21
to Nek5000
Hi Nadeem,

The reason why the names are different is because these are two different codes. You should use one OR the other: either the experimental LPM "module" in Nek5000 (like in short_tests/lpm_one and lpm_two) or the ppiclF library, which is an external library that needs to be linked with Nek5000. I suggest using ppiclF since it can do the same as LPM and more! It also has a Nek5000 example which you can run.

Best,
Juan Diego

Nadeem Malik

unread,
Feb 9, 2021, 1:08:02 PM2/9/21
to Nek5000

Thanks Juan, I will proceed with the ppiclF interface and exxample.

-nadeem

Nadeem Malik

unread,
Feb 10, 2021, 4:07:20 PM2/10/21
to Nek5000
I have followed the instructions, and successfully installed the ppiclF software and associated example files etc. I have also compiled the example case stokes_2D. However, some questions.

1. On the ppiclF site, it talks about the F-File which contains ppiclf_user.f which has 3 subroutines -- ppiclf_user_SetYdot, ppiclf_user_MapProjPart, and ppiclf_user_EvalNearestNeighbor. However, in the TestCaseDir, which is for this case, I do not see any of these files -- instead I see test.f which doesn'r contain of the this information. And yet it compiles without problem -- so I am obviously missing something important?

2. Within test.f, the header contains:
#include "PPICLF_USER.h"
#include "PPICLF_STD.h"

Again, I do see any of these two files within the directory? Where are they, and how do they get included into test.f? (I have found a PPICLF_USER.h file in ~/ppiclF/examples/stokes_2d/user_routines. The file ppiclf_user.f is also there -- but how does the program know that these files are here?)

3. This is a 2D Stokes flow example. What do I do in the test.f field if I want to produce a 3D case, with some arbitrary flow field  u(x,y,z,t)?

4. How do I include this inside a Nek5000 code? I presume I have to put in some headers and adjust the *.usr file somehow, and adjust compiler options?

Thanks,
Nadeem

tonyz...@gmail.com

unread,
Feb 10, 2021, 6:59:55 PM2/10/21
to Nadeem Malik, Nek5000

Hey Nadeem,

 

  1. I personally recommend you look at the example, ppiclf/examples/Nek5000, it is a better example than stokes_2d in my opinion if you are coming from a Nek5000 background.
  2. I am not sure of the specifics of how the Nek5000 program ‘sees’ the .h files you have mentioned but in your makenek file, you generally link some PPICLF libraries, again this is better captured in ppiclf/examples/Nek5000.
  3. I guess I personally think of PPICLF as a ‘bolt-on’ to Nek5000 that solves for the lagrangian particles. I.e, the work-flow to my mind is to first get your Nek5000 case running and then add in routines to advect the particles, which requires interpolation from the fluid to the points where particles reside (and projection of the feedback force back onto the fluid). So, in essence, if you wanted a 3D case, choose a Nek5000 case, that contains the fluid you are after, then add in the relevant routines that call PPICLF routines for the particle phase. Generally most of this is in userchk. I am happy to pass you a turbulent channel if this would help?
  4. Again, I have personally used ppiclf/examples/Nek5000 as a template.

 

Tony

--
You received this message because you are subscribed to the Google Groups "Nek5000" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/95b86d49-dc64-4a3d-bc66-87e979d60855n%40googlegroups.com.

Nadeem Malik

unread,
Feb 10, 2021, 8:58:44 PM2/10/21
to Nek5000
Thanks Tony,

I have my own Nek5000 code -- based on the 3d e3q example, so I will eventually be modifying that code in the manner that you describe.
But I wan to proceed in small steps, so I thought that I would first run the example codes -- 2D and then 3D -- first, and then progress to my own coe.
I wan to understand precisely the projection and back-force coupling and what subroutines to call where, etc.

Thanks for the tips.
Nadeem

Nadeem Malik

unread,
Feb 11, 2021, 10:43:07 PM2/11/21
to Nek5000

I have progressed a little more, but a compilation error message comes up -- some missing files it seems.

I am tryin to compile and build the Nek5000 example case. I have copied all  the source files to my sub-directory ~/ppiclF/TestNek, and this now contains the following files:

build.log
libnek5000.a
libppiclF.a
makefile
makenek
obj
PPICLC.h
PPICLF
ppiclf_comm.f
ppiclf.f
PPICLF_GEOM.h
PPICLF_GRID.h
ppiclf_io.f
ppiclf_mxm.f
ppiclf.o
ppiclf_op.f
PPICLF_OPT.h
PPICLF_PARALLEL.h
PPICLF_SOLN.h
ppiclf_solve.f
PPICLF_STD.h
ppiclf_user.f
PPICLF_USER.h
SIZE
uniform.box
uniform.f
uniform.ma2
uniform.o
uniform.par
uniform.re2
uniform.usr

So now, I do 
"make clean", then, "makenek", 
and it sees to be compiling nicely, but then I get the error message:

....
....
mpif77  -O2 -fpp -r8 -fpconstant   -DMPI -DUNDERSCORE -DGLOBAL_LONG_LONG -DTIMER -I/home1/06396/tg856952/ppiclF/TestNek -I/work/06396/tg856952/stampede2/Nek5000/core -I./ -I /work/06396/tg856952/stampede2/Nek5000/core/experimental  -c /home1/06396/tg856952/ppiclF/TestNek/uniform.f
building libnek5000.a ... done
mpif77  -O2 -fpp -r8 -fpconstant   -DMPI -DUNDERSCORE -DGLOBAL_LONG_LONG -DTIMER -I/home1/06396/tg856952/ppiclF/TestNek -I/work/06396/tg856952/stampede2/Nek5000/core -I./ -I /work/06396/tg856952/stampede2/Nek5000/core/experimental -o nek5000 /work/06396/tg856952/stampede2/Nek5000/core/drive.f /home1/06396/tg856952/ppiclF/TestNek/uniform.o libnek5000.a -L/work/06396/tg856952/stampede2/Nek5000/3rd_party/blasLapack -lblasLapack -L/work/06396/tg856952/stampede2/Nek5000/3rd_party/gslib/lib -lgs -Wl,--allow-multiple-definition
/home1/06396/tg856952/ppiclF/TestNek/uniform.o: In function `userf_':
uniform.f:(.text+0x53): undefined reference to `ppiclf_solve_getprofldijkef_'
uniform.f:(.text+0x74): undefined reference to `ppiclf_solve_getprofldijkef_'
uniform.f:(.text+0x93): undefined reference to `ppiclf_solve_getprofldijkef_'
/home1/06396/tg856952/ppiclF/TestNek/uniform.o: In function `userchk_':
uniform.f:(.text+0x1f8): undefined reference to `ppiclf_solve_getprofldijkef_'
uniform.f:(.text+0x8cd): undefined reference to `ppiclf_solve_interpfielduser_'
uniform.f:(.text+0x8de): undefined reference to `ppiclf_solve_interpfielduser_'
uniform.f:(.text+0x8ef): undefined reference to `ppiclf_solve_interpfielduser_'
uniform.f:(.text+0x90a): undefined reference to `ppiclf_solve_integrateparticle_'
/home1/06396/tg856952/ppiclF/TestNek/uniform.o: In function `usrdat2_':
uniform.f:(.text+0x17e7): undefined reference to `ppiclf_comm_initmpi_'
uniform.f:(.text+0x1b2e): undefined reference to `ppiclf_solve_initparticle_'
uniform.f:(.text+0x1b52): undefined reference to `ppiclf_solve_initgaussianfilter_'
uniform.f:(.text+0x1b83): undefined reference to `ppiclf_comm_initoverlapmesh_'
uniform.f:(.text+0x1b93): undefined reference to `ppiclf_solve_initneighborbin_'
uniform.f:(.text+0x1ba9): undefined reference to `ppiclf_solve_initwall_'
uniform.f:(.text+0x1bba): undefined reference to `ppiclf_solve_initperiodicx_'
make: *** [nek5000] Error 1
login4.stampede2(1112)$ ll

Can you advise please?

Thanks
Nadeem

Nadeem Malik

unread,
Feb 13, 2021, 10:43:04 PM2/13/21
to Nek5000
Hi,

Any progress on this query? 
I think the problem is that "make" is not actually compiling and producing all the *.o files needed further compile with "makenek"?

Thanks
Nadeem

Reply all
Reply to author
Forward
0 new messages