← Back to team overview

yade-users team mailing list archive

Re: [Question #697994]: how to decrease desired cell temperature constantly

 

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

    Status: Open => Answered

Robert Caulk proposed the following answer:
Hey Ibraheem,

You can make centerCellTemp() a function of O.iter:

def centerCellTemp():
        centerCellId=flow.getCell(.5,.5,.5)
        bcenterCellTemperature=flow.setCellTemperature(centerCellId, linearFunction(O.ter))

def linearFunction(x):
        m = slope # change of degrees/iteration
        b = yIntercept # degrees @ iteration 0
        return m*x+b

O.engines=O.engines+[PyRunner(iterPeriod=20,command
='centerCellTemp()')]

The PyRunner is executed once per iteration, which means the function
centerCellTemp() will execute once per iteration too. Your values for
slope and yIntercept depend on the shape of the linear function you want
to set.

Cheers,

Robert

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