Simulation of nanochannel membrane formation