The article describes the design and optimization of the foundry production of porous metal. The formation of porous metal by infiltrating liquid metal into the mould cavity appears to be the fastest and most economical way. However, it is not possible to do it without proper production parameters. For this reason, a 3D model of a particular casting is first created in the Rhinoceros 4.0 software and then the entire production process is designed and optimized using the numerical simulation in the MAGMASOFT® 5.4 software. To create cavities in the casting, the use of sand cores is considered and the used unit bentonite mixture (UBM) becomes the mould material. With the simulations of pouring and solidification of the casting, the right conditions for the real production can be defined precisely; the time and financial costs connected with the production of non-conforming pieces can be saved. Thus, the aim is to ensure the production of sound castings that will find their use in the field of energy, specifically as heat exchangers.V~lanku avtorji opisujejo dizajn in optimizacijo ulivanja poroznih kovinskih ulitkov. Ugotavljajo, da je formiranje porozne kovine s postopkom infiltracije raztaljene kovine v votlino livarskega modela najhitrej{i in najbolj ekonomi~en na~in. Toda tudi v tem primeru tega postopka ni mo`no izvajati brez ustreznih proizvodnih parametrov. Zato so avtorji najprej kreirali 3D model izbranega ulitka s programsko opremo Rhinoceros 4.0 in nato s programom MAGMASOFT® 5.4 izvedli numeri~no simulacijo dizajna in optimizacije celotnega proizvodnega procesa. Za izdelavo livarskega modela so uporabili pe{~ena jedra in betonitno me{anico (UBM). S simulacijo polnjenja modela z raztaljeno kovino in strjevanja ulitka pri optimalnih pogojih so tako v realni proizvodnji lahko natan~no dolo~ili~as in stro{ke, ter s tem prihranke, pri izdelavi ulitkov razli~nih zahtevnih oblik. Avtorji so tako omogo~ili proizvodnjo kvalitetnih ulitkov, uporabnih na energetskem podro~ju, predvsem za izmenjevalnike toplote. Klju~ne besede: porozna kovina, programska oprema za simulacijo, litje, toplotni izmenjevalnik