thank you for your help early~ recently I study the tidal flows. I want to simulate twice cycle period. it means I should change the inlet boundary condition to the outlet boundary condition. in the before post, I have asked the step what I can do. i use the restart to get the velocity of the last timestep as the restart case's initialization. when i use the restart, i change the BC in the GUI : inlet=> outlet . and then i use my code cs_boundary conditions.f90 to get the velocity.
for example, in the first case 1, I set the inlet(criteria INLET) and outlet (criteria OUTLET). in GUI, i first set the normal direction and the norm=0, and then the velocity =0.5,0,0 is set by code [screenshot 2 and 22], and then I change the boundary conditions as the case 2. the inlet's criteria are the OUTLET( these criteria just the define during mesh generation, , and this change has done in GUI,norm=0, the direction is the normal ). in the code, I set the velocity = -1,0,0. [screenshot 3 and 33]
the same set I have only done in the GUI(screenshot 4 and 5) without using the bc.f90. when I check the result in ParaView(stream lines), I find that the directions in the restart stage are different. the direction is flowing right is the restart stage by GUI. but in my code set, the restart stage flow direction is turned left.
I check my code and GUI set, I find that I use the GUI to set the boundary conditions, when the inlet is changed to the outlet, (also use the 0.5, not use the negative), the direction is changed to the left. but the same setup I use in my code, I find that the direction is still right. so I guess this setup is set by the GUI and then when I use the bc.90 are covered. maybe the boundary conditions are not changed in my case 2?
so I think there is something incorrect in my code, or maybe I can define the coordinates in my code? I read the document, it mentions the itrifb, but I also don't know how to use it, or will have any other methods?
can you help me? i don't know if I say clearly

best wish,
Yvonne