Mengjian —
What you want to do should be possible. IBAMR has built-in support for target points, and they should work at least as long as the point does not cross the periodic boundary. (You can control how much the points move by cranking up the penalty spring constant.) Things may also work when target points cross periodic boundaries — I feel like I made this work at some point, but it probably would be good to put in a test.
You could start with many of the IB examples — maybe ex2 — and modify. In this case, you will want to set up a vertex file with the initial positions of all of the points along the channel wall. If you call this file “channel.vertex”, then you would include in the input file settings for a structure named channel:
structure_names = "channel"
level_number = MAX_LEVELS - 1
uniform_target_stiffness = <<penalty spring stiffness value>>
uniform_target_damping = <<penalty damping parameter value>>
The vertex file format is very simple — the first line is the total number of points in the file, and then each successive line is the initial position for that point. If you ever need to index particular points, the indexing is all 0-based. (I.e. if you have N points, their indexes are 0…N-1.)
To drive forcing, you also will need a “forcing function”. You can add an input entry like this for a uniform force F = (1,0,0):
function_0 = "1.0" // x-component of the force
function_1 = "0.0" // y-component of the force
function_2 = "0.0" // z-component of the force
}
You also can use analytic functions of time and position, including “if” statements.
Finally, you will want to set up periodic boundary conditions at least in the x direction:
domain_boxes = [ (0,0,0),(N_x - 1,N_y - 1,N_z - 1) ]
periodic_dimension = 1,0,0 // periodic in x but not in y or z