Conditional Boundary Condition

General discussion about Elmer
Post Reply
GastónGarcía
Posts: 21
Joined: 08 Dec 2010, 01:00

Conditional Boundary Condition

Post by GastónGarcía »

Hi,

I'm trying to solve an elastic problem and need to impose a BC that depends on the position. I have an issue with the MATC syntax. I want to tell elmer to impose a displacement over a surface if the x-position is larger than... and smaller than... and can't find the exact syntax for that. I've looked for in the documentation and didn't find it. Could you please tell me how to do it? The line I entered is:

Displacement 2: Coordinate Variable 1; Real MATC; if (tx>2)&(tx<6) (0.2*tx) else (-0.2*tx)

Could you tell me where the error is?

Thanks a lot.

Gastón
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Conditional Boundary Condition

Post by mzenker »

Hi,

try

Displacement 2 = Variable Coordinate 1; Real MATC "if (tx>2)&(tx<6) (0.2*tx); else (-0.2*tx)"

I did not test it, though.

HTH,

Matthias
Post Reply