Fix cpl init

From cpl-wiki
Jump to: navigation, search

Section on fix_cpl_init

For CPL library, the fix we use is fix_cpl_init, which handles setup of the CPL library, using code in the "setup" hook to set up a coupled topology, extracting all required parameters from LAMMPS and sending these via MPI (to coupled code). The required averages are performed in the post_force hook, then information is exchanged between the codes and the constraint forces applied.

The coupling fix, fix_cpl_init, is turned by by adding a command of this form to LAMMPS input:

fix ID group-ID cpl/init region all forcetype X sendtype Y

The first two arguments are standard LAMMPS: ID = user-assigned name for the fix group-ID = ID of the group of atoms to apply the fix to The next part, cpl/init, is the "style", i.e. the fixes' name. "region all" specifies that the fix is applied to the entire box in space. Note that in the granular case, this is clearly consistent (as CFD overlaps the whole domain). For domain decompositional coupling, region should still be all, as we specify the extents of coupling through the file. The remaining words are the args which are currently as follows:

Section on forcetype

forcetype X -- This allows you to specify which constraint force system to use.

   The options include 
       1) test -- A simple test for debugging (sends cell indices)
       2) Flekkoy -- stress based coupling
       3) Velocity -- applies (U_particle - U_CFD) which is the most important part of the constraint of Nie, Chen, E and Robbins (2004)
       4) Drag -- base drag class for granular type drag forces
       5) Di_Felice -- an example granular drag class which applies the Di Felice drag correlation (untested!!)
       6+) This has been design so the user can add anything they want here easily. This process is described below. 

Section on sendtypes

sendtype Y -- Specifiy which data is sent to the CFD solver.

   This Y can be any combination of inputs (note they are additive)
       1) Pick 'n' mix send types
        a) VEL
        b) NBIN 
        c) STRESS
        d) FORCE
        e) FORCECOEFF
        f) VOIDRATIO
       2) Predefinded collections
        a) velocity --4 values including 3 velocity sums VEL and number of particles NBIN
        b) gran -- which sends voidratio VOIDRATIO and force FORCE 
        c) granfull - is designed for SediFOAM and sends velocity VEL, force FORCE, sum of drag coefficients FORCECOEFF and VOIDRATIO.
   So, for example, you could use gran and append an extra VEL to send VOIDRATIO, FORCE and VEL.

Optional: bndryavg Z -- the location of the bottom cell in domain-decompositional coupling, Z can be either below, above or midplane.