Greetings, 

I am working on modifying the shallow water model in ex11 for the purpose of my 
thesis. 

I wish to run a specific dam break scenario using this model. In the scenario, 
the velocity fields of certain cells must be constrained. That is I want to 
create an “artificial wall” inside the domain by constraining the value [uh] to 
not change. 

For this purpose, I tried creating a separate label in the DM. Further, I added 
the cells whose velocity values I wanted to constrain to the label using the 
routine :  DMLabelSetValue(labelWall, c, 100);

Next, in the routine where the boundary conditions are set, I pass a separate 
command :

PetscDSAddBoundary(prob, DM_BC_ESSENTIAL, "wall", "DamWall", 0, 1, &comp, (void 
(*)(void)) PhysicsBoundary_Dam_Wall, sizeof(damWallids), &damWallids, phys);

Ofcourse, in the function PhysicsBoundary_Dam_Wall() I set the vector value of 
[uh] to 0. When I do run the program, I do not see any of this in play (i.e., 
the values are not being constrained). 

Is there a smarter way to go about this or would you suggest a correction in my 
current method?

Thank you in advance for your wonderful suggestions and work!

Regards, 

Mukkund Sunjii 

Reply via email to