> I ran a test with a circular hole and a square hole. In both case I didn't get
> what I expected (see images attached).
>
> Eventually, I need to solve the problem on an irregular inner boundary so I am
> looking for a robust method.
>
> I copied below the code. I very much appreciate any help with this.
>
> Thank you
> Giovanna
>
> - - - - - - - - - -
> std::set<types::boundary_id> normal_flux_boundaries;
> std::map<types::boundary_id, const Function<dim> *> boundary_functions;
> double velocity = 0.005;
> Functions::ConstantFunction<dim, double>
> constant_velocity(velocity,numVariables);
This corresponds to a vector-valued function equal to
V = (v,v,...,v) // every component is equal to 'velocity'
> normal_flux_boundaries.insert (Internal_boundary);
> boundary_functions.insert({Internal_boundary, &constant_velocity});
>
> VectorTools::compute_nonzero_normal_flux_constraints ( dof_handler,
> 0, //
> first_vector_component,
> normal_flux_boundaries,
> boundary_functions,
> constraints,
> StaticMappingQ1< dim >::mapping
> );
And this function then computes the constraints that correspond to ensuring
that the solution's normal component equals
n * V
Because V points diagonally to the top right in your figures, the constraint
is that the normal component is zero whenever 'n' points to the top left or
bottom right, which is exactly what you see in the picture of your square with
a circular hole. In other words, I think it all looks like it should given
what the function is doing :-)
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/