16.08.2013 Views

Introduction to Code_Saturne - Working with subroutines

Introduction to Code_Saturne - Working with subroutines

Introduction to Code_Saturne - Working with subroutines

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Examples<br />

Change the density ρ as a function of the temperature T .<br />

!<br />

!<br />

iphas = 1<br />

ivart = isca ( iscalt ( iphas ))<br />

ipcrom = ipproc ( irom ( iphas ))<br />

vara = -4.0668d -3<br />

varb = -5.0754d -2<br />

varc = 1000.9 d0<br />

ρ = T (aT + b) + c<br />

do iel = 1, ncel<br />

xrtp = rtp (iel , ivart )<br />

propce (iel , ipcrom ) = xrtp * ( vara * xrtp + varb ) + varc<br />

enddo<br />

Physical properties (ρ, µ, Cp...) can be changed via the usphyv.f90<br />

subroutine.<br />

J. Uribe (University of Manchester) <strong>Introduction</strong> <strong>to</strong> <strong>Code</strong> <strong>Saturne</strong> 14 / 15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!