question

Kari Payton avatar image
0 Likes"
Kari Payton asked Kari Payton commented

FlexScript to set max output flow from fluid processor

What function can I use to set the maximum output of a fluid processor on a custom code in process flow? I am using the FlexSim flow library not FlowWorks. In flow works there's model.find("abc").output.maxRate. But I can't figure out what node that is for the regular fluid items.

FlexSim 19.1.0
flownodes
fluidprocoutput.png (12.2 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Kari Payton avatar image Kari Payton commented ·

I am able to use getvarnum(Model.find("FluidProcessor1"), "maxportoutrate") to get the value but when i try setvarnum(Model.find("FluidProcessor1"), "maxportoutrate",5); it doesn't work.

0 Likes 0 ·

1 Answer

Arun Kr avatar image
1 Like"
Arun Kr answered Kari Payton commented

It is the maxflowrate code. Try using the below code.

double FlowRate = 5;
Object FluidProcessor = Model.find("FluidProcessor1");
setvarnum(FluidProcessor,"maxflowrate",FlowRate);
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Kari Payton avatar image Kari Payton commented ·

Thanks Arun that worked.

0 Likes 0 ·
Kari Payton avatar image Kari Payton commented ·

@Arun KR Should I have my ticker set to a specific value for the processor to update? It updates in the properties pane but the output value on the 3D view doesn't change. So I am getting incorrect total kg output. It should be at least 1500 kg at the end of the model but it's only out-putting around 200 kg. fluid-flow-model.fsm

I want the fluid processor to act as a pump. The pump controls the output from the fluid tank. the problem is that the fluid processor needs a value for content but in reality it shouldn't matter the content.

0 Likes 0 ·
no-updates.png (99.8 KiB)
Arun Kr avatar image Arun Kr Kari Payton commented ·

Hi @Kari Payton,

Use a tank instead of Fluid processor and adjust the tank inflow and tank outflow the as that of the processor flowrate. It will work.

karipaytonsupport.fsm

Regards,

Arun KR

0 Likes 0 ·
Kari Payton avatar image Kari Payton Arun Kr commented ·

sweettttt. Thanks! That works better because it's not trying to hold the liquid.

0 Likes 0 ·