← Back to team overview

fenics team mailing list archive

Re: Noslip in x-direction of the hyperelastic cbc.twist case

 

On Thu, Feb 14, 2013 at 6:27 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> I don't think this is possible with the existing interface of
> CBC.Twist which assumes you want to set a Dirichlet boundary condition
> for all components of the displacement. But it should be possible to
> add a Dirichlet condition only for the x-displacement by modifying the
> solver itself. It's fairly well documented so it should be possible to
The solver is created in cbc.twist.problem_definitions.py in the
solve() routine of the problem directly, thus I cannot access the
boundary condition list bcu defined in the CBCSolver derived class
CG1MomentumBalanceSolver because creation and solve() coincide. My
thought was to simply append my condition like
BoundaryDC(vector.sub(0), Constant(0.0), "x[0] == 1.0") to the solvers
boundary condition list. A solution I see is to remove the coupling
between problem and solver, allowing me to change the "solver" before
executing or recreate the Hyperelasticity problem using DOLFIN only,
what is quite a nasty thing to do.

> Use the V.sub(i) functionality for setting boundary conditions only
> for a component of the full space (see demos for examples).
Thanks!

Roland


Follow ups

References