With the help of computational fluid dynamics (CFD), the design of membrane modules, the operating conditions and the implementation into the process like the design of cascade connections can be analyzed beforehand. A couple of studies investigate membrane separation processes in hollow fiber membranes with CFD whereas most of them use commercially available software. In this thesis, CFD simulations of the flow through hollow fiber membranes were used in order to examine the separation performance. The open source software OpenFOAM was used. As the standard package of OpenFOAM does not support the modeling of mass and energy transfer between different regions, a new base solver, named membraneFoam is developed at TU Wien. The solver handles source and sink terms on the boundaries to calculate energy and mass transfer between the regions. For all simulations, dense polymer membranes were assumed with mass transfer based on the solution-diffusion model. In the first step, a 3-D model of a module with seven fibers, five different permeate outlet positions and a membrane area of 0.011 m^2 was modeled. To mesh the geometry, the software Ansys GAMBIT was used. With this model, the influence of the flow patterns inside the hollow fibers and the shell on the separation performance was analyzed. In order to validate the new solver code, the influence of different inlet mass flows on the separation performance was analyzed. The results from the CFD simulations were compared to simulations which were carried out with an already validated membrane separation model. The program has been developed at TU Wien with the commercial process simulation software Aspen Custom Modeler. The results of the validation data to show deviations which proved to be in an acceptable low error range. In a next step, a single fiber 3-D membrane module with a membrane area of 0.00035m^2 was created with the software Ansys GAMBIT. The influence of different flow patterns, transmembrane pressures, permeances and inlet mass flows on the separation performance of the membrane module was analyzed. In order to compare the newly developed base solver to laboratory experiments, an actually existing hollow fiber module with 30 fibers and a membrane area of 0.0013m^2 was modeled. The membrane moduele geometry was created with a commercially available CAD software and meshed with the snappyHexMesh utility, which is supplied with OpenFOAM. The results of the CFD simualtion were compared to data from measurements with the module from lab experiments. The actual module has a membrane wall thickness of 55e-6 m, whereas the membrane walls in the simulation were assumed to be infinitely thin. Based on the results of the simulations, it can be stated that the developed solver membraneFoam enables to make reliable statements over the separation efficiency and flow patterns in membrane modules. Implementing a porous layer to the sovler to consider membrane wall thickness, analysis of mixing promotors of the flow and the analysis of other fluids than gases can be subject to further investigation.