Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Boundary Condition

Seyed Mohammad Hossein Jazayeri Shoushtari

Please login with a confirmed email address before reporting spam

Hi,
I want to use this expression as a boundary condition (pressure head) in the Richard's equation modules

Hp0=1.094-y+0.235*cos(0.0081*t)

where, t is the time and y is the vertical coordinate.

I want to use above expression whenever is positive and if it is negative put zero for Hp0.
I have tried to use 'the if operator' but it has not worked.How can I do that in the COMSOL?
Thanks in advance
Amir

2 Replies Last Post 20 giu 2012, 23:49 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 giu 2012, 15:42 GMT-4
Hi

have you tried the max() operator ?
Or a boolean (...)*(...>0)

but both of these have discontinuities that might well mike your solver have convergion issues

--
Good luck
Ivar
Hi have you tried the max() operator ? Or a boolean (...)*(...>0) but both of these have discontinuities that might well mike your solver have convergion issues -- Good luck Ivar

Seyed Mohammad Hossein Jazayeri Shoushtari

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 giu 2012, 23:49 GMT-4
Hi
Thank you for your response
yes I have tried both of them but they did not work properly.

1.094-y+0.235[m]*cos(0.0081[1/s]*t)*(y<=1.094)

OR

If ((1.094-y+0.235[m]*cos(0.0081[1/s]*t))<=0,0,(1.094-y+0.235[m]*cos(0.0081[1/s]*t))

The boundary condition is a linear function of y but when I use those operator the result is not linear (the line graph of the boundary ).
Another question is that when we turn on the gravity effects on Darcy's low or Richard's modules, the gravity effects acts as hydrostatic pressure or has other effects on the model?

The size of my model is a bit large (22Mb) and I can't attache it.

Would you please guide me to overcome this issue?
Regards,
Amir
Hi Thank you for your response yes I have tried both of them but they did not work properly. 1.094-y+0.235[m]*cos(0.0081[1/s]*t)*(y

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.