@@ -601,7 +601,39 @@ def alt_gem(self):
601601
602602 return gravitomagnetic_metric
603603
604-
604+ def dark_energy (self ):
605+ """
606+ Description
607+ ===========
608+ Returns a metric which describes a spacetime where the dark energy is present.
609+ ========
610+ >>> print(Solution().dark_energy())
611+ >>>
612+ LaTeX representation
613+ ====================
614+ """
615+
616+ # Index configuration for the metric
617+ index_config = "dd"
618+ # Required symbols and constants.
619+ c = symbols ('c' )
620+ # Assigns meaning to the coordinates.
621+ x0 , x1 , x2 , x3 = symbols ('t r psi theta' )
622+ # Reference to the coordiante system.
623+ coordinate_set = [x0 , x1 , x2 , x3 ]
624+ # Cosmological constant.
625+ cosmological_constant = 0
626+ # Metric solution.
627+ metric = Matrix ([
628+ [ 1 , 0 , 0 , 0 ],
629+ [ 0 , - x0 ** 2 * c ** 2 / (x0 ** 2 * c ** 2 - x1 ** 2 ), 0 , 0 ],
630+ [ 0 , 0 , - x0 ** 2 * c ** 2 , 0 ],
631+ [ 0 , 0 , 0 , - x0 ** 2 * c ** 2 * sin (x2 )** 2 ]
632+ ])
633+
634+ # An array detailing the solution.
635+ solution_array = [ metric , coordinate_set , index_config , cosmological_constant ]
636+ return solution_array
605637
606638 def hypersphere (self ):
607639 """
0 commit comments