Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

illegal variable name

asked 2018-06-11 02:46:48 -0500

luvscientist gravatar image

updated 2018-06-11 10:10:28 -0500

I used Radiance 5.0 Ver ( OS fedora)

Radiance run

**<Process>**

#!/bin/sh

###P40_Paju
oconv -r 10240 Paju_0417.sky Room.rad Prism_P40_10.rad > P40_Paju.oct
mkpmap -apg P40_Paju.gpm 5000 -t 30 \
 -apc P40_Paju.cpm 50000 P40_Paju.oct

rpict -ab 3 -aa .2 -ar 128 -ad 512 -dr 3 -dp 512 -t 10 \
   -ap P40_Paju.gpm 100 \
   -ap P40_Paju.cpm 500 \
   -vf view_Paju.view \
   -ro P40_1230.pic P40_Paju.oct

rtrace -w -h -I+ -ab 3 -aa .2 -ar 128 -ad 512 -dr 3 -dp 512 \
      -ap P40_Paju.gpm 100 \
      -ap P40_Paju.cpm 500 P40_Paju.oct < luxCalcPos.inp | 
      rcalc -e "$1=179*($1*0.265+$2*0.670+$3*0.065)" > P40_1230.dat

pcond -h P40_1230.pic > P40_1230.h.pic 
ra_t16 -3 P40_1230.h.pic > P40_1230.h.tga

**<Result>**
=179*(*0.265+*0.670+*0.065)
^ illegal variable name
rtrace : signal - Broken pipe

why Result ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2018-06-12 10:16:05 -0500

updated 2018-06-12 10:16:59 -0500

The trouble is that double-quotes don't work to hide shell variables under Unix, only under Windows. Try switching to single-quotes around your '$1=179*($1*0.265+$2*0.670+$3*0.065)' expression.

edit flag offensive delete link more

Comments

Thank you for your help.

luvscientist gravatar imageluvscientist ( 2018-06-13 21:08:03 -0500 )edit
1

answered 2018-06-11 09:51:03 -0500

Chris Rush gravatar image

Looks like you're missing the multiplication operator throughout your rcalc command. Add the * any time you need to multiply, at each term and also for multiplying by the set of parentheses. I don't think the command understands that no operator implies multiplication like it would in written algebra.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2018-06-11 02:46:48 -0500

Seen: 50 times

Last updated: Jun 12