If-Statement for UDF

  • 37 Views
  • Last Post 04 March 2019
  • Topic Is Solved
Max4 posted this 04 March 2019

Hi,

I´m trying to write an UDF for porous media which depends on time. So I have used an If-Statement, but an error occurs.

Is it necessary to have an else-statement after if? If yes, what should I write for the else? that the "source" is zero?

Regards,

Maxime

Order By: Standard | Newest | Votes
abenhadj posted this 04 March 2019

You need to put the if statement inside the the DEFINE... macros.

Best regards,

Amine

  • Liked by
  • Max4
Max4 posted this 04 March 2019

Before defining the variables? Then I have to do one for each macro, I guess. I have tried this, but it doesn´t work.

Regards,

Maxime

abenhadj posted this 04 March 2019

First of all that would not work using (rpgetvar..) that is now C and not Scheme. You need to use the macros CURRENT_TIME or RP_Get_Real("flow-time").

No further debugging will be provided here.

Best regards,

Amine

Close