I am using Code Saturne with Melissa software. I try to get it to output three different quantities. Scalar(concentration), velocity_x and velocity_y. I do it with cs_user_postprocess_var.f90, but I only manage to output the scalar field, the other two are empty and I am not sure what is wrong with my code. The thing is, it does output, if I check the Ensight format,, but not with Melissa output. Should I change anything else?
Below is my code:
Code: Select all
if (ipart .eq. 2) then
idimt = 1
ientla = .true.
ivarpr = .true.
call field_get_val_s_by_name('scalar1', cvar_scalar1)
do n = 1, ncel
myvar1(n) = cvar_scalar1(n)
enddo
call post_write_var(ipart, 'scalar1', idimt, ientla, ivarpr, &
ntcabs, ttcabs, myvar1, rvoid, rvoid)
else if (ipart.eq.1 ) then
idimt = 1
ientla = .true.
ivarpr = .true.
call field_get_val_v(ivarfl(iu), cvar_vel)
do n = 1, ncel
myvar(n) = cvar_vel(2, n)
enddo
call post_write_var(ipart, 'velocity_y, idimt, ientla, ivarpr, &
ntcabs, ttcabs, myvar, rvoid, rvoid)
else if (ipart.eq. -1) then
idimt = 1
ientla = .true.
ivarpr = .true.
call field_get_val_v(ivarfl(iu), cvar_vel)
do n = 1, ncel
myvar2(n) = cvar_vel(1. n)
enddo
call post_write_var(ipart, 'velocity_x', idimt, ientla, ivarpr, &
ntcabs, ttcabs, myvar2, rvoid, rvoid)