A computer-implemented method for analyzing retention of residual liquid in an object having spaces that could retain residual liquid and a wall surface on which an immersion treatment is performed, said method comprising the steps of: generating an analysis model in which said object is represented by meshes; identifying those meshes that correspond to said spaces as space meshes; after setting the attributes of said space meshes to values representative of a gas, identifying those of said space meshes that are located at a boundary to said wall surface of said object as a first group of space meshes in order to distinguish the first group of space meshes from other space meshes; setting the attributes of first group of space meshes from said values representative of said gas to values representative of a liquid having a specific gravity that differs from that of said gas; changing the attributes of those of said first group of space meshes that correspond to an opening portion which is at a boundary between said object and the outside of said object from said values representative of said liquid to values representative of a gas; processing sequentially from the upper to the lower space meshes, each mesh of said first group of space meshes that does not correspond to a boundary between said object and the outside of said object, wherein said processing comprises changing the attribute of the respective mesh being processed from said value representative of said liquid to said value representative of said gas based on the attributes of the meshes at the periphery of the respective mesh being processed, wherein said processing step comprises changing the attribute of the respective, processed mesh from said value representative of said liquid to said value representative of said gas if the attribute of any one or more of said space meshes adjacent to and having a centroid lower than or equal to the centroid of said respective, processed mesh is set to said value representative of said gas; and determining the presence or absence of residual liquid retained in said object based on the presence or absence of meshes whose attribute is set to a value representative of said liquid. generating an analysis model in which said object is represented by meshes; identifying those meshes that correspond to said spaces as space meshes; after setting the attributes of said space meshes to values representative of a gas, identifying those of said space meshes that are located at a boundary to said wall surface of said object as a first group of space meshes in order to distinguish the first group of space meshes from other space meshes; setting the attributes of first group of space meshes from said values representative of said gas to values representative of a liquid having a specific gravity that differs from that of said gas; changing the attributes of those of said first group of space meshes that correspond to an opening portion which is at a boundary between said object and the outside of said object from said values representative of said liquid to values representative of a gas; processing sequentially from the upper to the lower space meshes, each mesh of said first group of space meshes that does not correspond to a boundary between said object and the outside of said object, wherein said processing comprises changing the attribute of the respective mesh being processed from said value representative of said liquid to said value representative of said gas based on the attributes of the meshes at the periphery of the respective mesh being processed, wherein said processing step comprises changing the attribute of the respective, processed mesh from said value representative of said liquid to said value representative of said gas if the attribute of any one or more of said space meshes adjacent to and having a centroid lower than or equal to the centroid of said respective, processed mesh is set to said value representative of said gas; and determining the presence or absence of residual liquid retained in said object based on the presence or absence of meshes whose attribute is set to a value representative of said liquid.