Thread Previous • Date Previous • Date Next • Thread Next |
Anders Logg wrote:
On Thu, Feb 14, 2008 at 08:39:07AM +0100, Dag Lindbo wrote:Anders Logg wrote:On Wed, Feb 13, 2008 at 08:52:29PM +0100, Dag Lindbo wrote:On Tue, Feb 12, 2008 at 10:23:09AM +0100, Dag Lindbo wrote:Hello all! In the stokes demo (taylor-hood), I notice spurious pressure spikes near the corners. What is causing these? I changed to a paraboloc inflow profile (consistent with the no-slip BCs), but the problem remains. Further, I ran the same problem on a unitsquare mesh (see plot attached). The pressure spikes are large. Is the demo problem ill posed? Thanks! Dag Lindbo, KTHI would also suspect the boundary conditions for the velocity to be the problem, but if you still see the spikes with a parabolic inflow profile (which is zero at the no-slip boundaries) then I have no idea.Is this in all corners? Could you send a plot? /JohanProblem solved. Thanks for the help! The error is that the facets adjacent to the corners no get properly marked for noslip BC. Fix to get the correct subdomain markers, in demo/mesh/subdomain/main.cpp: class Noslip : public SubDomain { bool inside(const real* x, bool on_boundary) const { return (x[1] > 1.0 - DOLFIN_EPS || x[1] < DOLFIN_EPS) && on_boundary; } }; /Dag & ShilpaThen you don't get no-slip on the dolphin which makes the solution look pretty dull, don't you think?Right. For the dolfin you can put return ((x[1] > 1.0 - DOLFIN_EPS || x[1] < DOLFIN_EPS) || (x[0] > DOLFIN_EPS && x[0] < 1.0 - DOLFIN_EPS) ) && on_boundary; DagTurns out to be even simpler: return on_boundary does the trick. Inflow and outflow bcs will be applied after and then overwrite where we should not have no-slip.
Don't you think that would be a little opaque to a new user? -- ART -- ==================== Andy Terrel Computer Science Dept University of Chicago aterrel@xxxxxxxxxxxx ---------------------Science is what we understand well enough to explain to a computer. Art is everything else we do.
-Donald Knuth
Thread Previous • Date Previous • Date Next • Thread Next |