Invalid variable name in variable formula


Hi, all.
I am trying to calculate the surface roughness in oil/surfactant/water system.
LAMMPS version is lammps-17Jun13.


My problem is that some variables could not be recognized in the thermo section.




This is error message.



"Invalid variable name in variable formula"



I checked those names several times and there was no mistyping.



I attach the part of my input script which cause the problem below.








---------------------input script---------------------------------------------------------------------------------------------------------------------------------------



variable r_A equal sqrt(v_r_hi_max_B_9/100)



variable r_B equal sqrt(v_r_hi_min_B_9/100)



variable r_C equal sqrt(v_r_lo_max_B_9/100)



variable r_D equal sqrt(v_r_lo_min_B_9/100)








thermo_style custom step ke pe etotal temp vol press pxx pyy pzz v_tension c_D_h[1] c_D_h[2] c_D_h[3] c_D_h[4] c_D_l[1] c_D_l[2] c_D_l[3] c_D_l[4] v_r_A v_r_B v_r_C v_r_D



----------------------------------------------------------------------------------------------------------------------------------------------------------------------








Please, give me some advice.








Kind Regards.


  Hi, all.
I am trying to calculate the surface roughness in oil/surfactant/water
system.
LAMMPS version is lammps-17Jun13.

My problem is that some variables could not be recognized in the thermo
section.

This is error message.

    "Invalid variable name in variable formula"

I checked those names several times and there was no mistyping.

I attach the part of my input script which cause the problem below.

providing a partial input is almost always useless, because the error is
likely elsewhere. otherwise you would probably already found it.

axel.

Hi,

I’m not sure whether this will work, but you could try
to change the lines

to

variable r_A equal sqrt(${r_hi_max_B_9}/100)

etc.

Best,

Rolf