Creating expression fields - using functions in expressions

Hi,

I would like to create an expression in Abaqus/CAE which has the form:

cos(Th)*(cos(Th)>0)

where cos(Th)>0 is True (=1) between ±pi/2. However inequalities are not supported according to sec. 58.2.2 of the Abaqus/CAE users manual. An equivalent expression would be:

if(cos(Th)>0,cos(Th),0)

where first expression after the evaluation is True and the second is False. See attached plot

Can anyone think of a way to implement this function using the operators available in Abaqus/CAE or python?

Thanks,

Rod