[petsc-users] Regarding DM Labels
MUKKUND SUNJII
mukkundsunjii at gmail.com
Mon Jun 8 17:35:46 CDT 2020
Greetings,
I was indeed looking at implementing a model with variable bathymetry. It appears to be trickier than it seems.
Thank you for your suggestions.
Regards,
Mukkund
> On 8 Jun 2020, at 22:18, Jed Brown <jed at jedbrown.org> wrote:
>
> Re-adding the list.
>
> MUKKUND SUNJII <mukkundsunjii at gmail.com> writes:
>
>> Apologies, I understand your point about the non-wall domain.
>>
>> However, I am interested in what is happening on the other side of the dam (the reservoir).
>>
>> Furthermore, I suppose in the non-wall domain, the boundary condition would change with respect to the height of the water in the reservoir.
>
> Oh, you want this to be a wall that water can slosh over? I'd recommend
> using a formulation with variable bathymetry and looking at
> well-balanced schemes. Also read up on Riemann solvers capable of
> wetting and drying. I wouldn't treat it as a "boundary".
>
>> Regards,
>>
>> Mukkund
>>
>>> On 8 Jun 2020, at 22:05, MUKKUND SUNJII <mukkundsunjii at gmail.com> wrote:
>>>
>>> I am not familiar with the non-wall domain.
>>>
>>> Would you be kind enough to direct me to an tutorial or a test file in the repo?
>>>
>>> Regards,
>>>
>>> Mukkund
>>>
>>>> On 8 Jun 2020, at 22:02, Jed Brown <jed at jedbrown.org> wrote:
>>>>
>>>> MUKKUND SUNJII <mukkundsunjii at gmail.com> writes:
>>>>
>>>>> 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.
>>>>
>>>> Why not make your unstructured mesh be the non-wall domain? That way
>>>> you don't have to constrain cell values and you can (correctly) make the
>>>> (reconstructed) zero velocity occur at the cell boundary rather than the
>>>> cell interior.
>>>>
>>>>> 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
>>>
More information about the petsc-users
mailing list