Context. Evolution of massive stars is affected by a significant loss of mass either via (nearly) spherically symmetric stellar winds or by aspherical mass-loss mechanisms, namely the outflowing equatorial disks. However, the scenario that leads to the formation of a disk or rings of gas and dust around massive stars is still under debate. It is also unclear how various forming physical mechanisms of the circumstellar environment affect its shape and density, as well as its kinematic and thermal structure. Aims. We study the hydrodynamic and thermal structure of optically thick, dense parts of outflowing circumstellar disks that may be formed around various types of critically rotating massive stars, for example, Be stars, B[e] supergiant (sgB[e]) stars or Pop III stars. We calculate self-consistent time-dependent models of temperature and density structure in the disk's inner dense region that is strongly affected by irradiation from a rotationally oblate central star and by viscous heating. Methods. Using the method of short characteristics, we specify the optical depth of the disk along the line-of-sight from stellar poles. Within the optically thick dense region with an optical depth of τ > 2/3 we calculate the vertical disk thermal structure using the diffusion approximation while for the optically thin outer layers we assume a local thermodynamic equilibrium with the impinging stellar irradiation. For time-dependent hydrodynamic modeling, we use two of our own types of hydrodynamic codes: two-dimensional operator-split numerical code based on an explicit Eulerian finite volume scheme on a staggered grid, and unsplit code based on the Roe's method, both including full second-order Navier-Stokes shear viscosity. Results. Our models show the geometric distribution and contribution of viscous heating that begins to dominate in the central part of the disk for mass-loss rates higher thanṀ 10 −10 M yr −1 . In the models of dense viscous disks withṀ > 10 −8 M yr −1 , the viscosity increases the central temperature up to several tens of thousands of Kelvins, however the temperature rapidly drops with radius and with distance from the disk midplane. The high mass-loss rates and high viscosity lead to instabilities with significant waves or bumps in density and temperature in the very inner disk region. Conclusions. The two-dimensional radial-vertical models of dense outflowing disks including the full Navier-Stokes viscosity terms show very high temperatures that are however limited to only the central disk cores inside the optically thick area, while near the edge of the optically thick region the temperature may be low enough for the existence of neutral hydrogen, for example.