Tank changeover is a routine process in industry for
placing fuel
tanks into or out of service. The operation must use inert gas to
avoid the flammability zone. However, inert gas consumption should
be minimized for economic reasons. This requires dynamic modeling
and optimization of the process, as addressed in the present work.
A new dynamic optimization problem for minimizing the inert gas consumption,
while ensuring fire safety is proposed. As part of the problem constraints,
the flammability zone is characterized by disjunctive constraints,
which are then converted to a new simple, nonsmooth formula, removing
the need for data regression. This together with the multi-mode flow
equations in the model leads to a nonsmooth dynamic optimization problem.
To enable reliable solution by gradient-based solvers, the problem
is reformulated to a smooth one using sigmoid functions. Case studies
of methane tank purging and filling operations demonstrate that the
proposed approach is able to minimize the inert consumption by providing
optimal trajectories of the tank inlet and outlet flow rates, while
ensuring the operation remains outside the flammability zone. It is
shown that the proposed dynamic optimization can yield significant
economic benefits as it reduces the nitrogen consumption by about
two-third in one of the examples solved.