Thermodynamical and Logical Openness in General Systems