groovyBC for pressureInlet
Hello,
I got a two phase flow in a plate with two inlets. The second inlet should open at a specified time like: Code:
inlet Kind regards, Nico |
Quote:
b) I think your comment with inlet2 is incorrect. To get that kind of behaviour you should manipulate fractionExpression c) I don't see the problem with dependence of fields. Instead of the time-condition "time()<t0" write something like "max(pInlet)>pThres" and off you go (to have a "valve" that stays open once the condition is reached - even if the pressure drops afterwards - you'll need the stored variables in the swak-veriosn of groovBC) |
Hello Bernhard,
at first, thank you for your reply. Sorry, I posted the wrong code, I actually used that for inlet2, like you already said: Code:
inlet2 re c) the problem is that I can only adress the whole field, is that right? I need to extract a specific value of the field, for example a face value at the inlet patch. |
Quote:
"targetPos=vector(1,2,3);dist=mag(targetPos-pos());minDist=min(dist);pTemp=(dist==minDist) ? p : -1;pUsed=max(pTemp)" should work. Hold on. That won't work exactly like this because as soon as a remote variable is used it is boiled down to a single value. But what should work is "pUsed@inlet2= ...." The right hand side you get by substituting the other variables in the expression of the above "recipie". Will be a bit larger, but I guess you get the idea PS: the "1*(pinlet)" above is necessary? Hopefully not anymore in the swak-Variant of groovy |
All times are GMT -4. The time now is 15:49. |