Numerical simulation algorithms for optics design, computational imaging and wave-matter interaction are often implemented in legacy or non-free languages such as Fortran77/90, C/C++ or Matlab. Even if effective, these old codebases may pose challenges for hardware acceleration and parallelization of existing algorithms, two key aspects of modern digital twinning. In this paper, we propose to use Large Language Models (LLMs) to assist in the development, translation and optimization of such algorithms. By testing different free off-the-shelf alternatives, we evaluate our approach on several numerical simulation tasks in computational microscopy.