Adding a Neumann Boundary Condition at Certain Boundary
I am trying to solve a elasticity problem.
The model is a cube, clamped at the left side as Dirichlet boundary condition.
Then I would like to add a Neumann boundary condition (Traction force) at the right side of the cube.
How can I apply the neumann boundary condition just at the right side of the cube, not at all the surface? I have no problem applying the Dirichlet boundary, but I am not sure how to do apply Neumann boundary at specific domain.
This is the excerpt of my code in C++:
-------
UnitCube mesh(10, 10, 10);
Elasticity:
dUdN g;
// Set up boundary condition at left end
Clamp c_x;
Left left;
DirichletBC bc1(V, c_x, left);
std::vector<const BoundaryCondition*> bcs;
bcs.push_
// Set elasticity parameters
double E = 10.0;
double nu = 0.3;
Constant mu(E / (2*(1 + nu)));
Constant lambda(E*nu / ((1 + nu)*(1 - 2*nu)));
// Define variational problem
Elasticity:
a.mu = mu; a.lmbda = lambda;
Elasticity:
L.g = g;
Function u(V);
LinearVariati
// Compute solution
LinearVariati
solver.
solver.
solver.solve();
-------
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Marie Rognes
- Solved:
- Last query:
- Last reply: