Stack assembly comprising: - a hollow external housing having a central axis (A), the external housing extending from a first end to a second end and enclosing a housing space , wherein the external housing is a pressure vessel; - a membrane stack comprising a plurality of membranes , wherein the membrane stack is positionable inside the external housing ; - a number of side plates extending substantially parallel to the central axis (A), wherein each side plate of the number of side plates is associated with a side of the membrane stack and extending along the associated side ; - a number of sealing connectors that extend substantially parallel to the central axis (A) and adjacent with an inner surface of the external housing , wherein each sealing connector of the number of sealing connectors is configured to connect two side plates to each other; wherein the sealing connectors and the side plates cooperate to form an enclosing structure , and wherein, in use of the stack assembly, the enclosing structure encloses the membrane stack , wherein the enclosing structure is connected to the membrane stack for forming a unit, and wherein the enclosing structure is removably positioned in the housing space , wherein the stack assembly comprises a number of flow compartments , wherein each flow compartment is delineated by a side of the enclosing structure and an associated part of the inner surface of the external housing that extends from a first sealing connector of the side of the enclosing structure to a second sealing connector of the side of the enclosing structure. - a hollow external housing having a central axis (A), the external housing extending from a first end to a second end and enclosing a housing space , wherein the external housing is a pressure vessel; - a membrane stack comprising a plurality of membranes , wherein the membrane stack is positionable inside the external housing ; - a number of side plates extending substantially parallel to the central axis (A), wherein each side plate of the number of side plates is associated with a side of the membrane stack and extending along the associated side ; - a number of sealing connectors that extend substantially parallel to the central axis (A) and adjacent with an inner surface of the external housing , wherein each sealing connector of the number of sealing connectors is configured to connect two side plates to each other; wherein the sealing connectors and the side plates cooperate to form an enclosing structure , and wherein, in use of the stack assembly, the enclosing structure encloses the membrane stack , wherein the enclosing structure is connected to the membrane stack for forming a unit, and wherein the enclosing structure is removably positioned in the housing space , wherein the stack assembly comprises a number of flow compartments , wherein each flow compartment is delineated by a side of the enclosing structure and an associated part of the inner surface of the external housing that extends from a first sealing connector of the side of the enclosing structure to a second sealing connector of the side of the enclosing structure. wherein the sealing connectors and the side plates cooperate to form an enclosing structure , and wherein, in use of the stack assembly, the enclosing structure encloses the membrane stack , wherein the enclosing structure is connected to the membrane stack for forming a unit, and wherein the enclosing structure is removably positioned in the housing space , wherein the stack assembly comprises a number of flow compartments , wherein each flow compartment is delineated by a side of the enclosing structure and an associated part of the inner surface of the external housing that extends from a first sealing connector of the side of the enclosing structure to a second sealing connector of the side of the enclosing structure. <EOS>