← Back to team overview

yade-users team mailing list archive

Re: [Question #696228]: How to get a pressure boundary condition as triangle distribution by FlowEngine

 

Question #696228 on Yade changed:
https://answers.launchpad.net/yade/+question/696228

    Status: Open => Answered

Robert Caulk proposed the following answer:
Hello,

>> I think I can search for the cells which are outermost and use
"setCellPressure" [3] to get a boundary that the pressure increases with
depth. But this is too complicated. Is there any better idea?

That would be the solution, or use imposePressureFromId if you know the
IDs of the cells you want to impose. So assuming the cells you want to
set are already the boundaries:

	for i in range(0,flow.nCells()):
		coords = flow.getCellCenter(i)
		pressure_imposed = flow.getCellPImposed(i)
		if not pressure_imposed: continue
		zcoord = coords[0]
		pressure = density*g*zcoord
		flow.imposePressureFromId(i,pressure)



Cheers,

Robert

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.