def pipe_results_table(case_dom):
    """Print pipe dimensions in a tabular text format

    Args:
        case_dom (dict): Pipe flow network data model

    Returns:
        (str): Text table of pipe dimensions, routing, and results"""

    result = '  Pipe  From    To  Diameter         Length         CHW' \
             '      Volumetric Flow    Head Loss      From Head      To Head\n'
    for currpipe in case_dom['pipe']:
        ifrom = currpipe['from']
        ito = currpipe['to']
        result += '{0:3d}   {1:3d}     {2:3d}   {3:12.4E~}    {4:12.4E~}  ' \
                  '{5:7.3f}  {6:7.3f~}  {7:12.4E~}  {8:12.4E~}  {9:12.4E~}\n' \
                  .format(currpipe['id'],
                          currpipe['from'],
                          currpipe['to'],
                          currpipe['idiameter'],
                          currpipe['lpipe'],
                          currpipe['chw'],
                          currpipe['vol_flow'],
                          currpipe['head_loss'],
                          case_dom['junc'][ifrom]['head'],
                          case_dom['junc'][ito]['head'])
    return result