usvist routine for turbulent viscosity

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
daniele
Posts: 158
Joined: Wed Feb 01, 2017 11:42 am

usvist routine for turbulent viscosity

Post by daniele »

Hello,

I would like to write an algebraic equation for the turbulent viscosity, such as:

mu_t = mu * f(Re)

In v4.3, I understand I have to use the usvist routine. What is not clear for me, is if this routine must be written inside the cs_user_physical_properties.f90 or as a separated file usvist.f90. Anyway, I tried both, and I always get a “forbidden memory area access” error.

The “turbulent viscosity” variable is activated (I use the Mixing Length model) since it is present in the setup.log.

Could you provide me with some help in using the usvist routine?

Many thanks in advance.
Best regards,
Daniele
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: usvist routine for turbulent viscosity

Post by Yvan Fournier »

Hello,

Both options are possible.

Do you use a debug build ? If so, do you have a backtrace describing your error somewhat ?

Otherwise, can you post your user subroutines ?

Regards,

Yvan
daniele
Posts: 158
Joined: Wed Feb 01, 2017 11:42 am

Re: usvist routine for turbulent viscosity

Post by daniele »

Hello,

I do not use a debug build. By the way, how can I obtain it?
Attached you can find the subroutine.

Thanks in advance.

Best regards,

Daniele
Attachments
usvist.f90
(1.55 KiB) Downloaded 232 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: usvist routine for turbulent viscosity

Post by Yvan Fournier »

Hello,

The beginning of the installation manual provides instructions for a debug build. Basically you need to add --enable-debug to the configure stage.

Regards,

Yvan
Post Reply