Abstract The special structures of textile dressings contain the therapeutic substance in microcapsules. The diffusion of the activating agent (the exudate from the wound) through the material initiates the chemical reaction within microcapsules and releases the therapeutic agent. The semi-permeable membrane on the surface reduces the diffusion of therapeutic agent to surrounding, whereas the exudate diffuses normally. The oppositely directed coupled diffusion is analyzed within 2D cross-section of dressing. State variables are both activating agent concentration and therapeutic substance concentration. State equations, boundary and initial conditions are determined. The sensitivity of an arbitrary functional is analyzed by means of direct and adjoint approaches and implemented into the problem of shape optimization. Numerical example of 2D shape optimization is presented