57 #include "dllexport.h" 73 REAL(DP),
pointer :: x(:,:)
74 INTEGER(INTG),
pointer :: t(:,:)
75 INTEGER(INTG),
pointer :: nbt(:,:)
76 INTEGER(INTG),
pointer ::
b(:,:)
80 REAL(DP),
pointer :: y(:,:)
81 REAL(DP),
pointer :: y_f(:,:,:)
82 REAL(DP),
pointer :: dy(:,:,:), tdy(:,:,:), dy_f(:,:,:,:)
91 REAL(DP),
pointer :: q(:,:)
92 REAL(DP),
pointer :: p(:,:)
93 REAL(DP),
pointer :: xi(:,:)
94 INTEGER(INTG),
pointer :: b_id(:,:)
101 INTEGER(INTG) n_pts_f
103 INTEGER(INTG) n_pts_fl
109 INTEGER(INTG) spl, vel, prs
114 REAL(DP),
pointer :: gpt(:,:)
115 REAL(DP),
pointer :: gw(:)
116 REAL(DP),
pointer :: gpt_f(:,:,:)
117 REAL(DP),
pointer :: gw_f(:)
121 REAL(DP),
POINTER::n(:,:)
122 INTEGER(INTG),
POINTER::m(:,:),v(:,:),p(:,:)
123 INTEGER(INTG):: d,f,id_m,id_v,id_p,it_m,it_v,it_p,it_t
124 INTEGER(INTG):: e_m,e_p,e_v,e_t,en_m,en_p,en_v,en_t,n_m,n_p,n_v,n_t
130 INTEGER:: bc_number_of_wall_nodes, number_of_bcs
131 REAL(DP):: perm, vis, perm_over_vis, p_sink
132 REAL(DP):: x1, x2, y1, y2, z1, z2
133 REAL(DP):: length, geom_tol
134 REAL(DP):: max_node_spacing
135 LOGICAL :: stab, debug_mode, analytic
139 INTEGER:: number_of_couplings
140 INTEGER,
POINTER:: interface_element_number(:)
141 INTEGER,
POINTER:: interface_element_local_node(:)
143 INTEGER,
POINTER:: mesh1_element_number(:)
144 REAL(DP),
POINTER:: mesh1_element_xi(:,:)
146 INTEGER,
POINTER:: mesh2_element_number(:)
147 REAL(DP),
POINTER:: mesh2_element_xi(:,:)
151 INTEGER:: number_of_bc
152 INTEGER:: number_of_bc1
153 INTEGER:: number_of_bc2
154 INTEGER:: number_of_bc3
155 INTEGER:: number_of_bc4
156 INTEGER:: number_of_bc5
157 INTEGER,
POINTER:: bc_node_number1(:)
158 INTEGER,
POINTER:: bc_node_number2(:)
159 INTEGER,
POINTER:: bc_node_number3(:)
160 INTEGER,
POINTER:: bc_node_number4(:)
161 INTEGER,
POINTER:: bc_node_number5(:)
307 CHARACTER(14) :: NAME
309 INTEGER(INTG) :: EQUATIONS_SET_GLOBAL_NUMBER
310 TYPE(varying_string):: ERROR
312 INTEGER(INTG):: I,J,K,icompartment,FIELD_COMPONENT
313 INTEGER(INTG):: MATERIAL_INTERPOLATION_TYPE
315 TYPE(
field_type),
POINTER :: EQUATIONS_SET_FIELD_FIELD
316 INTEGER(INTG),
POINTER :: EQUATIONS_SET_FIELD_DATA(:)
318 REAL(DP),
POINTER :: ANALYTIC_VALUES(:)
321 enters(
"FLUID_MECHANICS_IO_WRITE_CMGUI",err,error,*999)
323 NULLIFY(equations_set)
324 NULLIFY(equations_set_field_field)
325 NULLIFY(equations_set_field_data)
399 equations_set => region%equations_sets%equations_sets(equations_set_global_number)%ptr
407 SELECT CASE(equations_set%SPECIFICATION(1))
409 SELECT CASE(equations_set%SPECIFICATION(2))
411 SELECT CASE(equations_set%SPECIFICATION(3))
417 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
418 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
419 & field_values_set_type,equations_set_field_data,err,error,*999)
420 icompartment=equations_set_field_data(1)
422 field_var_type=field_v_variable_type+(field_number_of_variable_subtypes*(icompartment-1))
431 SELECT CASE(equations_set%SPECIFICATION(1))
433 SELECT CASE(equations_set%SPECIFICATION(2))
435 SELECT CASE(equations_set%SPECIFICATION(3))
451 & variables(
var_idx)%number_of_components
454 IF(
ASSOCIATED(region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials))
THEN 455 material_field=>region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field
473 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
474 & %ptr%topology%elements%elements(1)%basis%number_of_element_parameters
484 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
485 & %ptr%topology%elements%elements(i)%basis%number_of_element_parameters
540 enters(
"CMGUI OUTPUT",err,error,*999)
544 field=>region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field
554 source_field=>region%equations_sets%equations_sets(equations_set_global_number)%ptr%source%source_field
575 numberofsourcecomponents=region%equations_sets%equations_sets(equations_set_global_number)%ptr%source%source_field% &
576 & variables(1)%number_of_components
583 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 587 CALL field_parameter_set_data_get(
field,field_u_variable_type,field_analytic_values_set_type,analytic_values, &
592 numberofdimensions=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
593 & %ptr%topology%elements%elements(i)%basis%number_of_xi
594 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
595 & %ptr%topology%elements%elements(i)%basis%number_of_element_parameters
611 xi_coordinates(1)=(region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
612 & geometric_field%variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(j))
614 xi_coordinates(1)=(region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
615 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%node_position_index(j,1)-1.0)/(region% &
616 & equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
617 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%number_of_nodes_xic(1)-1.0)
620 xi_coordinates(2)=(region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
621 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%node_position_index(j,2)-1.0)/(region% &
622 & equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
623 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%number_of_nodes_xic(2)-1.0)
628 xi_coordinates(3)=(region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
629 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%node_position_index(j,3)-1.0)/(region% &
630 & equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
631 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%number_of_nodes_xic(3)-1.0)
687 IF(j==11)
xi_coordinates(1:3)=[1.0_dp,1.0_dp/3.0_dp,2.0_dp/3.0_dp]
688 IF(j==12)
xi_coordinates(1:3)=[1.0_dp,2.0_dp/3.0_dp,1.0_dp/3.0_dp]
693 IF(j==17)
xi_coordinates(1:3)=[2.0_dp/3.0_dp,2.0_dp/3.0_dp,2.0_dp/3.0_dp]
694 IF(j==18)
xi_coordinates(1:3)=[2.0_dp/3.0_dp,2.0_dp/3.0_dp,1.0_dp]
695 IF(j==19)
xi_coordinates(1:3)=[2.0_dp/3.0_dp,1.0_dp,2.0_dp/3.0_dp]
696 IF(j==20)
xi_coordinates(1:3)=[1.0_dp,2.0_dp/3.0_dp,2.0_dp/3.0_dp]
703 k=region%meshes%meshes(1)%ptr%topology(1)%ptr%elements%elements(i)%global_element_nodes(j)
711 CALL field_interpolation_parameters_element_get(field_values_set_type,
element_number, &
717 CALL field_interpolation_parameters_element_get(field_analytic_values_set_type,
element_number, &
725 CALL field_interpolation_parameters_element_get(field_values_set_type,
element_number, &
733 CALL field_interpolation_parameters_element_get(field_values_set_type,
element_number, &
740 nodexvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field%variables(1) &
741 & %parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k)
745 nodeyvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field% &
746 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k+
nodespermeshcomponent(1))
749 nodezvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field% &
750 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k+2*
nodespermeshcomponent(1))
769 nodeuvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
773 nodevvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
778 nodewvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
779 & variables(1)%parameter_sets%parameter_sets(
parameter_set_idx)%ptr%parameters% &
803 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 834 material_interpolation_type=
material_field%variables(1)%COMPONENTS(1)%INTERPOLATION_TYPE
836 IF(material_interpolation_type==field_node_based_interpolation)
THEN 850 nodemuvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
851 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k)
852 noderhovalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
853 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k+
nodespermeshcomponent(1))
869 nodemuvalue=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
870 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(1)
871 noderhovalue=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
872 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(2)
875 nodeevalue=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
876 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(3)
877 nodeh0value=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
878 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(6)
879 nodea0value=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
880 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(9)
881 nodea1value=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
882 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(12)
883 nodea2value=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
884 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(15)
893 nodekappavalue=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
894 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(3)
905 IF(
source_field%variables(1)%COMPONENTS(1)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 931 nodepvalue2(k)=region%equations_sets%equations_sets(1)%ptr%dependent%dependent_field%variables(1) &
934 nodepvalue2(k)=region%equations_sets%equations_sets(1)%ptr%dependent%dependent_field%variables(1) &
943 lagrange_simplex=region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations% &
944 & interpolation%geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%type
964 field_component=field_component+1
972 field_component=field_component+1
980 elementnodes(i,j)=region%meshes%meshes(1)%ptr%topology(1)% &
981 &
ptr%elements%elements(i)%global_element_nodes(j)
989 exits(
"FLUID_MECHANICS_IO_WRITE_CMGUI")
991 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_CMGUI",err,error)
1008 CHARACTER(14) :: NAME
1009 INTEGER(INTG) :: EQUATIONS_SET_GLOBAL_NUMBER
1010 INTEGER(INTG) :: ERR
1011 TYPE(varying_string):: ERROR
1013 INTEGER(INTG):: I,J,K,icompartment
1014 INTEGER(INTG):: MATERIAL_INTERPOLATION_TYPE
1016 TYPE(
field_type),
POINTER :: EQUATIONS_SET_FIELD_FIELD
1017 INTEGER(INTG),
POINTER :: EQUATIONS_SET_FIELD_DATA(:)
1019 enters(
"FLUID_MECHANICS_IO_WRITE_ENCAS",err,error,*999)
1060 NULLIFY(equations_set_field_data)
1083 equations_set => region%equations_sets%equations_sets(equations_set_global_number)%ptr
1091 SELECT CASE(equations_set%SPECIFICATION(1))
1093 SELECT CASE(equations_set%SPECIFICATION(2))
1095 SELECT CASE(equations_set%SPECIFICATION(3))
1101 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
1102 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
1103 & field_values_set_type,equations_set_field_data,err,error,*999)
1104 icompartment=equations_set_field_data(1)
1105 var_idx = 3+2*(icompartment-1)
1106 field_var_type=field_v_variable_type+(field_number_of_variable_subtypes*(icompartment-1))
1112 SELECT CASE(equations_set%SPECIFICATION(1))
1114 SELECT CASE(equations_set%SPECIFICATION(2))
1116 SELECT CASE(equations_set%SPECIFICATION(3))
1131 numberofvariablecomponents=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
1132 & variables(
var_idx)%number_of_components
1134 numberofmaterialcomponents=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
1135 & variables(1)%number_of_components
1146 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
1147 & %ptr%topology%elements%elements(1)%basis%number_of_element_parameters
1157 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
1158 & %ptr%topology%elements%elements(i)%basis%number_of_element_parameters
1202 enters(
"CMGUI OUTPUT",err,error,*999)
1204 field=>region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field
1215 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
1216 & %ptr%topology%elements%elements(i)%basis%number_of_element_parameters
1222 xi_coordinates(1)=(region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
1223 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%node_position_index(j,1)-1.0)/(region% &
1224 & equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
1225 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%number_of_nodes_xic(1)-1.0)
1226 xi_coordinates(2)=(region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
1227 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%node_position_index(j,2)-1.0)/(region% &
1228 & equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
1229 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%number_of_nodes_xic(2)-1.0)
1230 xi_coordinates(3)=(region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
1231 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%node_position_index(j,3)-1.0)/(region% &
1232 & equations_sets%equations_sets(equations_set_global_number)%ptr%equations%interpolation% &
1233 & geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%number_of_nodes_xic(3)-1.0)
1235 stop
'Encas format only available for 3D hex and tets' 1239 k=region%meshes%meshes(1)%ptr%topology(1)%ptr%elements%elements(i)%global_element_nodes(j)
1243 CALL field_interpolation_parameters_element_get(field_values_set_type,
element_number, &
1246 nodexvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field%variables(1) &
1247 & %parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k)
1248 nodeyvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field%variables(1) &
1252 nodezvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field% &
1253 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k+2*
nodespermeshcomponent(1))
1257 nodeuvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
1260 nodevvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
1265 nodewvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
1287 material_interpolation_type=region%equations_sets%equations_sets(equations_set_global_number)%ptr% &
1288 & materials%materials_field%variables(1)%COMPONENTS(1)%INTERPOLATION_TYPE
1290 IF(material_interpolation_type==field_node_based_interpolation)
THEN 1291 nodemuvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
1292 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k)
1293 noderhovalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
1294 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k+
nodespermeshcomponent(1))
1302 nodekappavalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
1303 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k+2*
nodespermeshcomponent(1))
1308 nodemuvalue=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
1309 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(1)
1310 noderhovalue=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
1311 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(2)
1317 nodekappavalue=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
1318 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(3)
1329 lagrange_simplex=region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations% &
1330 & interpolation%geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%type
1352 elementnodes(i,j)=region%meshes%meshes(1)%ptr%topology(1)% &
1353 &
ptr%elements%elements(i)%global_element_nodes(j)
1361 exits(
"FLUID_MECHANICS_IO_WRITE_ENCAS")
1363 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_ENCAS",err,error)
1378 CHARACTER(14),
INTENT(IN) :: NAME
1379 TYPE(varying_string) :: FILENAME
1383 INTEGER(INTG) :: ERR
1384 TYPE(varying_string):: ERROR
1385 DOUBLE PRECISION:: velocity_magnitude
1389 filename=
"./output/"//name//
".geo" 1390 OPEN(unit=80, file=char(filename),status=
'unknown')
1391 WRITE(80,*)
'OpenCMISS Exported Encas Model Geometry File' 1393 WRITE(80,*)
'node id assign' 1394 WRITE(80,*)
'element id assign' 1397 WRITE(80,*)
'OpenCMISS' 1398 WRITE(80,*)
'coordinates' 1423 WRITE(80,*)
'tetra10' 1439 stop
'Encas format only available for 3D hex and tets' 1535 stop
'Encas format only available for 3D hex and tets' 1545 filename=
"./output/"//name//
".scl1" 1546 OPEN(unit=81, file=char(filename),status=
'unknown')
1547 WRITE(81,*)
'Absolute Pressure' 1550 WRITE(81,*)
'coordinates' 1558 filename=
"./output/"//name//
".scl2" 1559 OPEN(unit=82, file=char(filename),status=
'unknown')
1560 WRITE(82,*)
'Velocity Magnitude' 1563 WRITE(82,*)
'coordinates' 1567 WRITE(82,
'(e12.5)')velocity_magnitude
1572 filename=
"./output/"//name//
".scl3" 1573 OPEN(unit=83, file=char(filename),status=
'unknown')
1574 WRITE(83,*)
'X Velocity' 1577 WRITE(83,*)
'coordinates' 1584 filename=
"./output/"//name//
".scl4" 1585 OPEN(unit=84, file=char(filename),status=
'unknown')
1586 WRITE(84,*)
'Y Velocity' 1589 WRITE(84,*)
'coordinates' 1596 filename=
"./output/"//name//
".scl5" 1597 OPEN(unit=85, file=char(filename),status=
'unknown')
1598 WRITE(85,*)
'Z Velocity' 1601 WRITE(85,*)
'coordinates' 1607 filename=
"./output/"//name//
".vel" 1608 OPEN(unit=86, file=char(filename),status=
'unknown')
1609 WRITE(86,*)
'Velocity' 1612 WRITE(86,*)
'coordinates' 1626 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_DATA_ENCAS",err,error)
1641 INTEGER:: I,J,start_time_step,number_of_timesteps
1642 DOUBLE PRECISION:: time_increment,time
1644 CHARACTER(9),
INTENT(IN) :: NAME
1645 TYPE(varying_string) :: FILENAME
1647 INTEGER(INTG) :: ERR
1648 TYPE(varying_string):: ERROR
1651 filename=
"./output/"//name//
".case" 1652 OPEN(unit=87, file=char(filename),status=
'unknown')
1655 WRITE(87,*)
'type: ensight gold' 1657 WRITE(87,*)
'GEOMETRY' 1658 WRITE(87,*)
'model: ./OpenCMISS.geo' 1660 WRITE(87,*)
'VARIABLE' 1662 WRITE(87,*)
'scalar per node: 1 Magnitude OpenCMISS.Magnitude_**' 1663 WRITE(87,*)
'scalar per node: 1 Speed_SumSquares OpenCMISS.Speed_SumSquares_**' 1664 WRITE(87,*)
'scalar per node: 1 Pressure OpenCMISS.Pressure_**' 1665 WRITE(87,*)
'vector per node: 1 Velocity OpenCMISS.Velocity_**' 1668 WRITE(87,*)
'time set: 1 Model' 1669 WRITE(87,*)
'number of steps: ', number_of_timesteps
1670 WRITE(87,*)
'filename start number: ', start_time_step
1671 WRITE(87,*)
'filename increment: 1' 1672 WRITE(87,
'(" time values:")',advance=
"NO")
1674 DO i=1,number_of_timesteps
1676 time=i*time_increment
1677 WRITE(87,
'(e13.5)',advance=
"NO")time
1689 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_MASTER_ENCAS_PPE",err,error)
1705 INTEGER:: I,J,start_time_step,number_of_timesteps
1706 DOUBLE PRECISION:: time_increment,time
1708 CHARACTER(14),
INTENT(IN) :: NAME
1709 TYPE(varying_string) :: FILENAME
1711 INTEGER(INTG) :: ERR
1712 TYPE(varying_string):: ERROR
1715 filename=
"./output/"//name//
".encas" 1716 OPEN(unit=87, file=char(filename),status=
'unknown')
1719 WRITE(87,*)
'type: ensight gold' 1721 WRITE(87,*)
'GEOMETRY' 1722 WRITE(87,*)
'model: 1 ./TIME_STEP_****.geo' 1724 WRITE(87,*)
'VARIABLE' 1725 WRITE(87,*)
'scalar per node: 1 pressure ./TIME_STEP_****.scl1' 1726 WRITE(87,*)
'scalar per node: 1 velocity-magnitude ./TIME_STEP_****.scl2' 1727 WRITE(87,*)
'scalar per node: 1 velocity-u ./TIME_STEP_****.scl3' 1728 WRITE(87,*)
'scalar per node: 1 velocity-v ./TIME_STEP_****.scl4' 1729 WRITE(87,*)
'scalar per node: 1 velocity-w ./TIME_STEP_****.scl5' 1730 WRITE(87,*)
'vector per node: 1 velocity ./TIME_STEP_****.vel' 1733 WRITE(87,*)
'time set: 1 Model' 1734 WRITE(87,*)
'number of steps: ', number_of_timesteps
1735 WRITE(87,*)
'filename start number: ', start_time_step
1736 WRITE(87,*)
'filename increment: 1' 1737 WRITE(87,
'(" time values:")',advance=
"NO")
1739 DO i=1,number_of_timesteps
1741 time=i*time_increment
1742 WRITE(87,
'(e13.5)',advance=
"NO")time
1754 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_MASTER_ENCAS",err,error)
1769 CHARACTER(14) :: NAME
1770 INTEGER(INTG) :: EQUATIONS_SET_GLOBAL_NUMBER
1771 INTEGER(INTG) :: ERR
1772 TYPE(varying_string):: ERROR
1774 INTEGER(INTG):: I,J,K
1780 enters(
"FLUID_MECHANICS_IO_WRITE_ENCAS_BLOCK",err,error,*999)
1824 equations_set => region%equations_sets%equations_sets(equations_set_global_number)%ptr
1832 SELECT CASE(equations_set%SPECIFICATION(1))
1834 SELECT CASE(equations_set%SPECIFICATION(2))
1836 SELECT CASE(equations_set%SPECIFICATION(3))
1846 SELECT CASE(equations_set%SPECIFICATION(1))
1848 SELECT CASE(equations_set%SPECIFICATION(2))
1850 SELECT CASE(equations_set%SPECIFICATION(3))
1865 numberofvariablecomponents=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
1866 & variables(
var_idx)%number_of_components
1868 numberofmaterialcomponents=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
1869 & variables(1)%number_of_components
1880 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
1881 & %ptr%topology%elements%elements(1)%basis%number_of_element_parameters
1891 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
1892 & %ptr%topology%elements%elements(i)%basis%number_of_element_parameters
1916 enters(
"CMGUI OUTPUT",err,error,*999)
1918 field=>region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field
1928 nodesperelement(i)=region%fields%fields(1)%ptr%geometric_field%decomposition%domain(1) &
1929 & %ptr%topology%elements%elements(i)%basis%number_of_element_parameters
1952 k=region%meshes%meshes(1)%ptr%topology(1)%ptr%elements%elements(i)%global_element_nodes(j)
1959 nodexvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field%variables(1) &
1960 & %parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k)
1961 nodeyvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field%variables(1) &
1965 nodezvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%geometry%geometric_field% &
1966 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(k+2*
nodespermeshcomponent(1))
1976 nodeuvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%source%source_field% &
1977 & variables(
var_idx)%parameter_sets%parameter_sets(2)%ptr%parameters%cmiss%data_dp(k)
1979 nodevvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%source%source_field% &
1984 nodeuvalueorg(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
1987 nodevvalueorg(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
1992 nodewvalueorg(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
2001 nodewvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%source%source_field% &
2023 nodepvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
2028 nodemuvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
2029 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(1)
2030 noderhovalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%materials%materials_field% &
2031 & variables(1)%parameter_sets%parameter_sets(1)%ptr%parameters%cmiss%data_dp(2)
2034 nodelabelvalue(k)=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
2045 lagrange_simplex=region%equations_sets%equations_sets(equations_set_global_number)%ptr%equations% &
2046 & interpolation%geometric_interp_parameters(field_u_variable_type)%ptr%bases(1)%ptr%type
2078 elementnodes(i,j)=region%meshes%meshes(1)%ptr%topology(1)% &
2079 &
ptr%elements%elements(i)%global_element_nodes(j)
2089 exits(
"FLUID_MECHANICS_IO_WRITE_ENCAS_BLOCK")
2091 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_ENCAS_BLOCK",err,error)
2106 CHARACTER(7) :: NAME
2107 INTEGER(INTG) :: EQUATIONS_SET_GLOBAL_NUMBER
2108 INTEGER(INTG) :: ERR
2109 TYPE(varying_string):: ERROR
2111 INTEGER(INTG):: NODES_PER_COMPONENT,I
2116 TYPE(varying_string) :: FILENAME
2117 DOUBLE PRECISION:: fit
2119 enters(
"FLUID_MECHANICS_IO_WRITE_FITTED_FIELD",err,error,*999)
2121 nodes_per_component=region%equations_sets%equations_sets(1)%ptr%dependent% &
2122 & dependent_field%variables(1)%components(1)%param_to_dof_map%node_param2dof_map%number_of_node_parameters
2124 filename=
"./output/VEL_"//name//
".fit" 2125 OPEN(unit=81, file=char(filename),status=
'unknown')
2126 WRITE(81,*)nodes_per_component*3
2128 DO i = 1,nodes_per_component*3
2129 fit=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
2130 & variables(1)%parameter_sets%parameter_sets(
parameter_set_idx)%ptr%parameters%cmiss%data_dp(i)
2131 WRITE(81,
'(e12.5)') fit
2135 filename=
"./output/LAM_"//name//
".err" 2136 OPEN(unit=81, file=char(filename),status=
'unknown')
2137 WRITE(81,*)nodes_per_component
2139 DO i = nodes_per_component*3+1,nodes_per_component*4
2140 fit=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
2141 & variables(1)%parameter_sets%parameter_sets(
parameter_set_idx)%ptr%parameters%cmiss%data_dp(i)
2142 WRITE(81,
'(e12.5)') fit
2146 filename=
"./output/U_"//name//
".fit" 2147 OPEN(unit=81, file=char(filename),status=
'unknown')
2150 DO i = 1,nodes_per_component
2151 fit=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
2152 & variables(1)%parameter_sets%parameter_sets(
parameter_set_idx)%ptr%parameters%cmiss%data_dp(i)
2153 WRITE(81,
'(e12.5)') fit
2157 filename=
"./output/V_"//name//
".fit" 2158 OPEN(unit=81, file=char(filename),status=
'unknown')
2161 DO i = nodes_per_component+1,nodes_per_component*2
2162 fit=region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
2163 & variables(1)%parameter_sets%parameter_sets(
parameter_set_idx)%ptr%parameters%cmiss%data_dp(i)
2164 WRITE(81,
'(e12.5)') fit
2168 filename=
"./output/W_"//name//
".fit" 2169 OPEN(unit=81, file=char(filename),status=
'unknown')
2172 DO i = nodes_per_component*2+1,nodes_per_component*3
2173 WRITE(81,
'(e12.5)') region%equations_sets%equations_sets(equations_set_global_number)%ptr%dependent%dependent_field% &
2174 & variables(1)%parameter_sets%parameter_sets(
parameter_set_idx)%ptr%parameters%cmiss%data_dp(i)
2178 exits(
"FLUID_MECHANICS_IO_WRITE_FITTED_FIELD")
2180 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_FITTED_FIELD",err,error)
2194 CHARACTER(14),
INTENT(IN) :: NAME
2195 TYPE(varying_string) :: FILENAME
2198 INTEGER(INTG) :: ERR
2199 TYPE(varying_string):: ERROR
2205 filename=
"./output/"//name//
".scl1" 2206 OPEN(unit=81, file=char(filename),status=
'unknown')
2207 WRITE(81,*)
'Absolute Pressure' 2218 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_DATA_ENCAS_BLOCK",err,error)
2234 CHARACTER(len=14),
INTENT(IN) :: NAME
2235 TYPE(varying_string) :: FILENAME
2238 INTEGER(INTG) :: ERR, ierror
2239 TYPE(varying_string):: ERROR
2243 IF(
darcy%ANALYTIC ) analytic=.true.
2245 IF(
darcy%ANALYTIC )
THEN 2250 IF(
ASSOCIATED(equations_set%ANALYTIC)) analytic=.true.
2252 filename=
"./output/"//name//
".exnode" 2253 OPEN(unit=14, file=char(filename), status=
'unknown', iostat=ierror)
2257 WRITE(14,*)
'Group name: OpenCMISS' 2266 WRITE(14,*)
' 1) coordinates, coordinate, rectangular cartesian, #Components=',trim(
nms(
numberofdimensions))
2270 WRITE(14,*)
' x. Value index= ',trim(
nms(
valueindex)),
', #Derivatives= 0' 2272 WRITE(14,*)
' y. Value index= ',trim(
nms(
valueindex)),
', #Derivatives= 0' 2274 WRITE(14,*)
' z. Value index= ',trim(
nms(
valueindex)),
', #Derivatives= 0' 2282 WRITE(14,*)
' ',trim(
nms(i)),
'. Value index= ',trim(
nms(
valueindex)),
', #Derivatives= 0' 2290 WRITE(14,*)
' ',trim(
nms(i)),
'. Value index= ',trim(
nms(
valueindex)),
', #Derivatives= 0' 2299 WRITE(14,*)
' ',trim(
nms(i)),
'. Value index= ',trim(
nms(
valueindex)),
', #Derivatives= 0' 2308 WRITE(14,*)
' ',trim(
nms(i)),
'. Value index= ',trim(
nms(
valueindex)),
', #Derivatives= 0' 2314 WRITE(14,*)
' ',trim(
nms(i)),
'. Value index= ',trim(
nms(
valueindex)),
', #Derivatives= 0' 2325 WRITE(14,*)
' Node: ',i
2470 IF(
darcy%ANALYTIC )
THEN 2510 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_NODES_CMGUI",err,error)
2523 CHARACTER(len=14),
INTENT(IN) :: NAME
2524 TYPE(varying_string) :: FILENAME
2527 INTEGER(INTG):: I,J,K,KK
2528 INTEGER(INTG) :: ERR,ierror
2529 TYPE(varying_string):: ERROR
2530 LOGICAL:: OUTPUT_FLAG
2532 filename=
"./output/"//name//
".exelem" 2533 OPEN(unit=5, file=char(filename),status=
'unknown', iostat=ierror)
2534 WRITE(5,*)
'Group name: OpenCMISS' 2541 output_flag = .true.
2543 output_flag = .true.
2545 output_flag = .false.
2548 IF( output_flag )
THEN 2554 WRITE(5,*)
'#Scale factor sets= 1' 2556 WRITE(5,*)
' l.simplex(2)*l.simplex, #Scale factors= ',
nodesperelement(kk)
2558 WRITE(5,*)
'#Scale factor sets= 1' 2560 WRITE(5,*)
' l.simplex(2)*l.simplex, #Scale factors= ',
nodesperelement(kk)
2562 WRITE(5,*)
'#Scale factor sets= 1' 2564 WRITE(5,*)
' q.simplex(2)*q.simplex, #Scale factors= ',
nodesperelement(kk)
2569 WRITE(5,*)
'#Scale factor sets= 1' 2571 WRITE(5,*)
' l.simplex(2;3)*l.simplex*l.simplex, #Scale factors= ',
nodesperelement(kk)
2573 WRITE(5,*)
'#Scale factor sets= 1' 2575 WRITE(5,*)
' q.simplex(2;3)*q.simplex*q.simplex, #Scale factors= ',
nodesperelement(kk)
2577 WRITE(5,*)
'#Scale factor sets= 1' 2579 WRITE(5,*)
' q.simplex(2;3)*q.simplex*q.simplex, #Scale factors= ',
nodesperelement(kk)
2582 WRITE(5,*)
'#Scale factor sets= 0' 2586 WRITE(5,*)
'#Scale factor sets= 1' 2593 WRITE(5,*)
'l.Lagrange*l.Lagrange, #Scale factors=',
nodesperelement(kk)
2596 WRITE(5,*)
'q.Lagrange*q.Lagrange, #Scale factors=',
nodesperelement(kk)
2599 WRITE(5,*)
'c.Lagrange*c.Lagrange, #Scale factors=',
nodesperelement(kk)
2604 WRITE(5,*)
'l.Lagrange*l.Lagrange*l.Lagrange, #Scale factors=',
nodesperelement(kk)
2607 WRITE(5,*)
'q.Lagrange*q.Lagrange*q.Lagrange, #Scale factors=',
nodesperelement(kk)
2610 WRITE(5,*)
'c.Lagrange*c.Lagrange*c.Lagrange, #Scale factors=',
nodesperelement(kk)
2621 WRITE(5,*)
' 1) coordinates, coordinate, rectangular cartesian, #Components= ',trim(
nms(
numberofdimensions))
2634 WRITE(5,*)
' x. q.Lagrange, no modify, standard node based.' 2636 WRITE(5,*)
' y. q.Lagrange, no modify, standard node based.' 2638 WRITE(5,*)
' z. q.Lagrange, no modify, standard node based.' 2641 WRITE(5,*)
' ',trim(
nms(j)),
'. q.Lagrange, no modify, standard node based.' 2647 WRITE(5,*)
' x. l.Lagrange*l.Lagrange, no modify, standard node based.' 2649 WRITE(5,*)
' x. q.Lagrange*q.Lagrange, no modify, standard node based.' 2651 WRITE(5,*)
' x. c.Lagrange*c.Lagrange, no modify, standard node based.' 2654 WRITE(5,*)
' x. l.simplex(2)*l.simplex, no modify, standard node based.' 2656 WRITE(5,*)
' x. q.simplex(2)*q.simplex, no modify, standard node based.' 2658 WRITE(5,*)
' x. c.simplex(2)*c.simplex, no modify, standard node based.' 2662 WRITE(5,*)
' y. l.Lagrange*l.Lagrange, no modify, standard node based.' 2664 WRITE(5,*)
' y. q.Lagrange*q.Lagrange, no modify, standard node based.' 2666 WRITE(5,*)
' y. c.Lagrange*c.Lagrange, no modify, standard node based.' 2668 WRITE(5,*)
' y. l.simplex(2)*l.simplex, no modify, standard node based.' 2670 WRITE(5,*)
' y. q.simplex(2)*q.simplex, no modify, standard node based.' 2672 WRITE(5,*)
' y. c.simplex(2)*c.simplex, no modify, standard node based.' 2676 WRITE(5,*)
' z. l.Lagrange*l.Lagrange, no modify, standard node based.' 2678 WRITE(5,*)
' z. q.Lagrange*q.Lagrange, no modify, standard node based.' 2680 WRITE(5,*)
' z. c.Lagrange*c.Lagrange, no modify, standard node based.' 2682 WRITE(5,*)
' z. l.simplex(2)*l.simplex, no modify, standard node based.' 2684 WRITE(5,*)
' z. q.simplex(2)*q.simplex, no modify, standard node based.' 2686 WRITE(5,*)
' z. c.simplex(2)*c.simplex, no modify, standard node based.' 2691 WRITE(5,*)
' ',trim(
nms(j)),
'. l.Lagrange*l.Lagrange, no modify, standard node based.' 2693 WRITE(5,*)
' ',trim(
nms(j)),
'. q.Lagrange*q.Lagrange, no modify, standard node based.' 2695 WRITE(5,*)
' ',trim(
nms(j)),
'. c.Lagrange*c.Lagrange, no modify, standard node based.' 2697 WRITE(5,*)
' ',trim(
nms(j)),
'. l.simplex(2)*l.simplex, no modify, standard node based.' 2699 WRITE(5,*)
' ',trim(
nms(j)),
'. q.simplex(2)*q.simplex, no modify, standard node based.' 2701 WRITE(5,*)
' ',trim(
nms(j)),
'. c.simplex(2)*c.simplex, no modify, standard node based.' 2708 WRITE(5,*)
' x. l.Lagrange*l.Lagrange*l.Lagrange, no modify, standard node based.' 2710 WRITE(5,*)
' x. q.Lagrange*q.Lagrange*q.Lagrange, no modify, standard node based.' 2712 WRITE(5,*)
' x. c.Lagrange*c.Lagrange*c.Lagrange, no modify, standard node based.' 2714 WRITE(5,*)
' x. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.' 2716 WRITE(5,*)
' x. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.' 2718 WRITE(5,*)
' x. c.simplex(2;3)*c.simplex*c.simplex, no modify, standard node based.' 2722 WRITE(5,*)
' y. l.Lagrange*l.Lagrange*l.Lagrange, no modify, standard node based.' 2724 WRITE(5,*)
' y. q.Lagrange*q.Lagrange*q.Lagrange, no modify, standard node based.' 2726 WRITE(5,*)
' y. c.Lagrange*c.Lagrange*c.Lagrange, no modify, standard node based.' 2728 WRITE(5,*)
' y. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.' 2730 WRITE(5,*)
' y. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.' 2732 WRITE(5,*)
' y. c.simplex(2;3)*c.simplex*c.simplex, no modify, standard node based.' 2736 WRITE(5,*)
' z. l.Lagrange*l.Lagrange*l.Lagrange, no modify, standard node based.' 2738 WRITE(5,*)
' z. q.Lagrange*q.Lagrange*q.Lagrange, no modify, standard node based.' 2740 WRITE(5,*)
' z. c.Lagrange*c.Lagrange*c.Lagrange, no modify, standard node based.' 2742 WRITE(5,*)
' z. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.' 2744 WRITE(5,*)
' z. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.' 2746 WRITE(5,*)
' z. c.simplex(2;3)*c.simplex*c.simplex, no modify, standard node based.' 2751 WRITE(5,*)
' ',trim(
nms(j)),
'. l.Lagrange*l.Lagrange*l.Lagrange, no modify, standard node based.' 2753 WRITE(5,*)
' ',trim(
nms(j)),
'. q.Lagrange*q.Lagrange*q.Lagrange, no modify, standard node based.' 2755 WRITE(5,*)
' ',trim(
nms(j)),
'. c.Lagrange*c.Lagrange*c.Lagrange, no modify, standard node based.' 2757 WRITE(5,*)
' ',trim(
nms(j)),
'. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.' 2759 WRITE(5,*)
' ',trim(
nms(j)),
'. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.' 2761 WRITE(5,*)
' ',trim(
nms(j)),
'. c.simplex(2;3)*c.simplex*c.simplex, no modify, standard node based.' 2769 WRITE(5,*)
' ',trim(
nms(k)),
'. #Values=1' 2770 WRITE(5,*)
' Value indices: 1' 2771 WRITE(5,*)
' Scale factor indices: ',trim(
nms(k))
2806 WRITE(5,*)
'Element: ', k,
' 0 0' 2807 WRITE(5,*)
' Nodes:' 2809 WRITE(5,*)
' Scale factors:' 2819 WRITE(5,*)
'Element: ', k,
' 0 0' 2820 WRITE(5,*)
' Nodes:' 2823 WRITE(5,*)
' Scale factors:' 2838 999 errorsexits(
"FLUID_MECHANICS_IO_WRITE_ELEMENTS_CMGUI",err,error)
2853 INTEGER(INTG) :: ERR
2854 TYPE(varying_string):: ERROR
2859 enters(
"FLUID_MECHANICS_IO_READ_CMHEART1",err,error,*999)
2861 WRITE(*,*)
'Importing CMHEART information...' 2872 OPEN(unit=42, file=
'./input/CMHEART.inp',status=
'old')
2895 WRITE(*,*)
'Import finished successfully...' 2901 CALL flagerror(
"Error during allocation.",err,error,*999)
2946 CALL flagerror(
"Error during allocation.",err,error,*999)
2949 exits(
"FLUID_MECHANICS_IO_READ_CMHEART1")
2951 999 errorsexits(
"FLUID_MECHANICS_IO_READ_CMHEART1",err,error)
2969 INTEGER(INTG) :: ERR
2970 TYPE(varying_string):: ERROR
2975 enters(
"FLUID_MECHANICS_IO_READ_CMHEART2",err,error,*999)
2977 WRITE(*,*)
'Importing CMHEART information...' 2988 OPEN(unit=42, file=
'./input/CMHEART_MESH1.inp',status=
'old')
3011 WRITE(*,*)
'Import finished successfully...' 3017 CALL flagerror(
"Error during allocation.",err,error,*999)
3062 CALL flagerror(
"Error during allocation.",err,error,*999)
3066 OPEN(unit=42, file=
'./input/CMHEART_BC.inp',status=
'old')
3071 exits(
"FLUID_MECHANICS_IO_READ_CMHEART2")
3073 999 errorsexits(
"FLUID_MECHANICS_IO_READ_CMHEART2",err,error)
3092 INTEGER(INTG) :: ERR
3093 TYPE(varying_string):: ERROR
3098 enters(
"FLUID_MECHANICS_IO_READ_CMHEART3",err,error,*999)
3100 WRITE(*,*)
'Importing CMHEART information...' 3114 OPEN(unit=42, file=
'./input/CMHEART_MESH1.inp',status=
'old')
3116 OPEN(unit=42, file=
'./input/CMHEART_MESH2.inp',status=
'old')
3118 OPEN(unit=42, file=
'./input/CMHEART_INTERFACE.inp',status=
'old')
3146 WRITE(*,*)
'Import finished successfully...', i
3152 CALL flagerror(
"Error during allocation.",err,error,*999)
3203 CALL flagerror(
"Error during allocation.",err,error,*999)
3209 OPEN(unit=42, file=
'./input/CMHEART_CONNECT.inp',status=
'old')
3217 OPEN(unit=42, file=
'./input/CMHEART_BC.inp',status=
'old')
3223 exits(
"FLUID_MECHANICS_IO_READ_CMHEART3")
3225 999 errorsexits(
"FLUID_MECHANICS_IO_READ_CMHEART3",err,error)
3244 WRITE(*,*)
'Free all CMHEART information memory...' 3265 exits(
"FLUID_MECHANICS_IO_READ_CMHEART_FINISH")
3277 INTEGER,
DIMENSION(TMP%E_T):: ELEMENT_MASKING
3278 REAL,
DIMENSION(TMP%N_V):: NODE_MASKING
3279 INTEGER,
POINTER:: BC_MASKING(:)
3281 INTEGER:: CONTROL_INSIDE, CONTROL_BETWEEN, CONTROL_OUTSIDE
3289 WRITE(*,*)
'Perform enhanced PPE masking...' 3296 OPEN(unit=42, file=
"./input/data/ORI_DATA_01.dat",status=
'unknown')
3299 READ(42,*)node_masking(i)
3304 IF(node_masking(
tmp%M(i,j))<0.5_dp)
THEN 3305 element_masking(i)=0
3310 IF(element_masking(i)==0)
THEN 3312 IF(node_masking(
tmp%M(i,j))>0.5_dp)
THEN 3313 element_masking(i)=2
3323 IF(element_masking(i)==0)
THEN 3324 control_outside=control_outside+1
3325 ELSE IF(element_masking(i)==1)
THEN 3326 control_inside=control_inside+1
3327 ELSE IF(element_masking(i)==2)
THEN 3328 control_between=control_between+1
3336 IF(element_masking(i)==0)
THEN 3338 bc_masking(
tmp%M(i,j))=0
3344 IF(element_masking(i)==2)
THEN 3346 bc_masking(
tmp%M(i,j))=2
3352 IF(element_masking(i)==1)
THEN 3354 bc_masking(
tmp%M(i,j))=1
3359 exits(
"FLUID_MECHANICS_IO_PPE_MASKING")
3372 INTEGER(INTG) :: ERR
3373 TYPE(varying_string):: ERROR
3377 OPEN(unit=1,file=
nimz,status=
'old',action=
'read')
3414 OPEN(unit=1,file=
nimz,status=
'old',action=
'read')
3447 ELSE IF(
dimen==3)
THEN 3471 ELSE IF(
dimen==3)
THEN 3481 ELSE IF(
dimen==3)
THEN 3491 ELSE IF(
dimen==3)
THEN 3504 stop
'Error during allocation' 3507 999 errorsexits(
"FLUID_MECHANICS_IO_READ_AUX",err,error)
3519 INTEGER(INTG):: I,J,M,N
3520 INTEGER(INTG)::NEW(n,m),OLD(n,m)
3828 OPEN(unit = 1, file=
namz,status=
'old')
3834 WRITE(*,*)
'Reading Nodes...' 3839 READ(1,*,end=35) temp(1:3)
3862 stop
'Error during allocation' 3884 OPEN(unit=79,file=
nimz,status=
'old',action=
'read')
3895 READ(79,*)
connect_tmp%INTERFACE_ELEMENT_NUMBER(i), &
3901 WRITE(*,*)
'Import finished successfully... IMC' 3917 INTEGER(INTG):: NumberOfFaces, NumberOfNodes, HighestNodeNumber
3918 INTEGER(INTG):: FLAG,I1,I2,I3,I4,I5,I,J
3921 INTEGER(INTG),
DIMENSION(:),
ALLOCATABLE:: DUMMY,TMP1,TMP2,TMP3,TMP4,TMP5
3924 OPEN(unit = 79, file=
namz,status=
'old')
3925 READ(79,*) numberoffaces, numberofnodes
3937 DO i=1,numberoffaces
3938 READ(79,*) dummy(1:numberofnodes+1),flag
3939 DO j=2,numberofnodes+1
3940 IF(dummy(j)>highestnodenumber) highestnodenumber=dummy(j)
3946 ALLOCATE(tmp1(highestnodenumber))
3947 ALLOCATE(tmp2(highestnodenumber))
3948 ALLOCATE(tmp3(highestnodenumber))
3949 ALLOCATE(tmp4(highestnodenumber))
3950 ALLOCATE(tmp5(highestnodenumber))
3958 OPEN(unit = 79, file=
namz,status=
'old')
3959 READ(79,*) numberoffaces, numberofnodes
3961 DO i=1,numberoffaces
3962 READ(79,*) dummy(1:numberofnodes+1),flag
3964 DO j=2,numberofnodes+1
3965 IF(tmp1(dummy(j))==1)
THEN 3972 ELSE IF(flag==2)
THEN 3973 DO j=2,numberofnodes+1
3974 IF(tmp2(dummy(j))==1)
THEN 3981 ELSE IF(flag==3)
THEN 3982 DO j=2,numberofnodes+1
3983 IF(tmp3(dummy(j))==1)
THEN 3990 ELSE IF(flag==4)
THEN 3991 DO j=2,numberofnodes+1
3992 IF(tmp4(dummy(j))==1)
THEN 3999 ELSEIF(flag==5)
THEN 4000 DO j=2,numberofnodes+1
4001 IF(tmp5(dummy(j))==1)
THEN 4025 DO i=1,highestnodenumber
4028 bc_tmp%BC_NODE_NUMBER1(i1)=i
4034 bc_tmp%BC_NODE_NUMBER2(i2)=i
4039 bc_tmp%BC_NODE_NUMBER3(i3)=i
4044 bc_tmp%BC_NODE_NUMBER4(i4)=i
4049 bc_tmp%BC_NODE_NUMBER5(i5)=i
4057 WRITE(*,*)
'Import bc successfully... BC' 4078 & number_of_dimensions,boundary_condition,option,iteration)
4079 INTEGER(INTG):: SOLVER_TYPE,I,NUMBER_OF_TIME_STEPS,OPTION
4080 REAL(DP),
POINTER :: BOUNDARY_VALUES(:)
4081 INTEGER(INTG),
POINTER :: BOUNDARY_NODES(:)
4082 INTEGER(INTG):: NUMBER_OF_DIMENSIONS,BOUNDARY_CONDITION,NUM_BC_NODES,ITERATION
4084 CHARACTER(34) :: INPUT_FILE
4086 INTEGER(INTG):: ENDI
4090 number_of_time_steps=1
4091 number_of_dimensions=42
4094 IF(boundary_condition==1)
THEN 4097 WRITE(input_file,
'("./input/BC/BC_VALUES_",I0,".dat")') iteration
4102 OPEN(unit=1, file=input_file,status=
'unknown')
4103 READ(1,*) num_bc_nodes
4104 ALLOCATE(boundary_nodes(num_bc_nodes))
4105 ALLOCATE(boundary_values(num_bc_nodes))
4107 READ(1,*) boundary_nodes(i)
4110 READ(1,*) boundary_values(i)
4112 boundary_values=boundary_values
4113 boundary_nodes=boundary_nodes
4127 & option,time_step,time,length_scale)
4129 INTEGER(INTG):: SOLVER_TYPE,I,OPTION, TIME_STEP
4130 REAL(DP),
POINTER :: BOUNDARY_VALUES(:)
4131 INTEGER(INTG):: NUMBER_OF_DIMENSIONS,BOUNDARY_CONDITION,NUM_BC_NODES
4132 REAL(DP):: LENGTH_SCALE,TIME
4134 CHARACTER(34) :: INPUT_FILE
4139 INTEGER(INTG):: ENDI
4144 IF(solver_type==1)
THEN 4145 IF(boundary_condition==5)
THEN 4148 ELSE IF(option==1)
THEN 4149 ENDI=SIZE(BOUNDARY_VALUES)
4150 IF(time_step<10)
THEN 4151 WRITE(input_file,
'("./input/motion/DISPLACEMENT_0",I0,".dat")') time_step
4152 ELSE IF(time_step<100)
THEN 4153 WRITE(input_file,
'("./input/motion/DISPLACEMENT_",I0,".dat")') time_step
4155 OPEN(unit=time_step,file=input_file,status=
'unknown')
4157 READ(time_step,*) boundary_values(i)
4159 boundary_values=boundary_values*length_scale
4160 WRITE(*,*)
'1! BOUNDARY_VALUES=BOUNDARY_VALUES' 4162 ELSEIF(option==2)
THEN 4163 ENDI=SIZE(BOUNDARY_VALUES)/number_of_dimensions
4165 boundary_values(1:endi)=0.0_dp
4167 boundary_values(endi+1:endi+endi)=-0.05_dp*cos(2.0_dp*pi*1.0_dp/40.0_dp*time)
4169 boundary_values(endi+endi+1:endi+endi+endi)=0.0_dp
4170 ELSEIF(option==3)
THEN 4171 ENDI=SIZE(BOUNDARY_VALUES)/number_of_dimensions
4173 boundary_values(1:endi)=-1.0_dp
4175 boundary_values(endi+1:endi+endi)=-1.0_dp
4177 boundary_values(endi+endi+1:endi+endi+endi)=-1.0_dp
4178 ELSEIF(option==4)
THEN 4179 ENDI=SIZE(BOUNDARY_VALUES)/number_of_dimensions
4181 boundary_values(1:endi)=0.0_dp
4183 boundary_values(endi+1:endi+endi)=0.0_dp
4185 boundary_values(endi+endi+1:endi+endi+endi)=-0.1_dp*cos(2.0_dp*pi*1.0_dp/40.0_dp*time)
4186 ELSEIF(option==69)
THEN 4187 ENDI=SIZE(BOUNDARY_VALUES)/number_of_dimensions
4189 boundary_values(1:endi)=0.0_dp
4191 boundary_values(endi+1:endi+endi)=0.0_dp
4193 boundary_values(endi+endi+1:endi+endi+endi)=-100.0_dp*time
4195 stop
'Error during boundary input' 4197 ELSEIF(boundary_condition==1)
THEN 4200 WRITE(input_file,
'("./input/BC/BC_VALUES_",F10.7,".dat")') time
4205 OPEN(unit=1, file=input_file,status=
'unknown')
4206 READ(1,*) num_bc_nodes
4207 ALLOCATE(boundary_values(num_bc_nodes))
4209 READ(1,*) boundary_values(i)
4211 boundary_values=boundary_values
4212 WRITE(*,*)
'1! BOUNDARY_VALUES=BOUNDARY_VALUES' 4215 ELSE IF(solver_type==2)
THEN 4216 IF(boundary_condition==2)
THEN 4218 ENDI=SIZE(BOUNDARY_VALUES)/number_of_dimensions
4220 boundary_values(1:endi)=0.0_dp
4222 boundary_values(endi+1:endi+endi)=0.0_dp
4224 boundary_values(endi+endi+1:endi+endi+endi)=1000.0_dp*time
4226 stop
'Error during boundary input' 4229 ELSE IF(solver_type==3)
THEN 4230 IF(boundary_condition==2)
THEN 4244 & boundaryvalues,boundarycondition,option,time,stoptime)
4246 INTEGER(INTG) :: Err
4247 TYPE(varying_string) :: Error
4248 TYPE(field_type),
POINTER :: GeometricField
4249 INTEGER(INTG) :: SolverType,Option
4251 REAL(DP),
ALLOCATABLE,
INTENT(OUT) :: BoundaryValues(:)
4252 INTEGER(INTG) :: BoundaryCondition,MaterialSpecification,arraySize,NodeNumber,I,ComponentNumber
4253 INTEGER(INTG),
PARAMETER :: Blood=1
4254 INTEGER(INTG),
PARAMETER :: Plate2D=2
4255 INTEGER(INTG),
PARAMETER :: Plate3D=3
4256 INTEGER(Intg),
ALLOCATABLE,
INTENT(OUT) :: InletNodes(:)
4257 REAL(DP) :: Time,StopTime,Y
4259 materialspecification=option
4261 IF(solvertype==3)
THEN 4262 SELECT CASE(materialspecification)
4264 ALLOCATE(inletnodes(5))
4265 inletnodes=(/29,7,43,13,58/)
4266 ALLOCATE(boundaryvalues(5))
4268 DO i=1,
SIZE(inletnodes)
4272 boundaryvalues(i)=0.1_dp/(1.0_dp+exp(-0.5_dp*time+2.0_dp))
4274 CASE(plate2d,plate3d)
4275 IF(materialspecification==plate2d)
THEN 4276 OPEN (unit=1, file=
'./Input/2D/BC/Plate2DinletBC.txt', &
4277 & status=
'old', action=
'read')
4280 OPEN (unit=1, file=
'./Input/3D/BC/Plate3DinletBC.txt', &
4281 & status=
'old', action=
'read')
4285 IF(arraysize==0) stop
"Number of boundary conditions for fluid domain is zero. Invalid." 4286 ALLOCATE(inletnodes(arraysize))
4287 ALLOCATE(boundaryvalues(arraysize))
4288 READ(1,*) inletnodes(:)
4291 boundaryvalues=0.0_dp
4292 DO i=1,
SIZE(inletnodes)
4293 nodenumber=inletnodes(i)
4294 CALL field_parameter_set_get_node(geometricfield,field_u_variable_type, &
4295 & field_values_set_type,1,1,nodenumber,componentnumber,
Value,err,error,*999)
4297 boundaryvalues(i)=0.01_dp/(1.0_dp+exp(-0.5_dp*time*1.0_dp+2.0_dp))
4302 stop
"Invalid input option for position dependent boundary conditions in FSI problem." 4305 stop
"Not implemented." 4318 & input_option,time_step,length_scale)
4320 INTEGER(INTG):: SOLVER_TYPE,I,INPUT_OPTION,CHECK
4321 INTEGER(INTG) :: ERR
4322 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS
4323 TYPE(varying_string):: ERROR
4324 REAL(DP),
POINTER :: INPUT_VALUES(:)
4325 INTEGER(INTG):: INPUT_TYPE
4326 REAL(DP) :: LENGTH_SCALE
4328 INTEGER(INTG):: ENDI,TIME_STEP
4329 CHARACTER(35) :: INPUT_FILE
4330 CHARACTER(29) :: UVEL_FILE
4333 number_of_dimensions=42
4338 IF(input_type==1)
THEN 4339 ENDI=SIZE(INPUT_VALUES)
4343 IF(input_option==1)
THEN 4344 IF(time_step<10)
THEN 4345 WRITE(uvel_file,
'("./input/data/VEL_DATA_0",I0,".dat")') time_step
4346 ELSE IF(time_step<100)
THEN 4347 WRITE(uvel_file,
'("./input/data/VEL_DATA_",I0,".dat")') time_step
4349 ELSE IF(input_option==2)
THEN 4350 IF(time_step<=10)
THEN 4351 WRITE(uvel_file,
'("./input/data/VEL_DATA_0",I0,".dat")') time_step-1
4352 ELSE IF(time_step<100)
THEN 4353 WRITE(uvel_file,
'("./input/data/VEL_DATA_",I0,".dat")') time_step-1
4355 ELSE IF(input_option==3)
THEN 4356 IF(time_step<10)
THEN 4357 WRITE(uvel_file,
'("./input/data/ORI_DATA_0",I0,".dat")') time_step
4358 ELSE IF(time_step<100)
THEN 4359 WRITE(uvel_file,
'("./input/data/ORI_DATA_",I0,".dat")') time_step
4361 ELSE IF(input_option==4)
THEN 4362 IF(time_step<10)
THEN 4363 WRITE(uvel_file,
'("./input/data/U_DATA_0",I0,".dat")') time_step
4364 ELSE IF(time_step<100)
THEN 4365 WRITE(uvel_file,
'("./input/data/U_DATA_",I0,".dat")') time_step
4367 ELSE IF(input_option==5)
THEN 4368 IF(time_step<10)
THEN 4369 WRITE(uvel_file,
'("./input/data/V_DATA_0",I0,".dat")') time_step
4370 ELSE IF(time_step<100)
THEN 4371 WRITE(uvel_file,
'("./input/data/V_DATA_",I0,".dat")') time_step
4373 ELSE IF(input_option==6)
THEN 4374 IF(time_step<10)
THEN 4375 WRITE(uvel_file,
'("./input/data/W_DATA_0",I0,".dat")') time_step
4376 ELSE IF(time_step<100)
THEN 4377 WRITE(uvel_file,
'("./input/data/W_DATA_",I0,".dat")') time_step
4380 CALL write_string(general_output_type,uvel_file,err,error,*999)
4381 OPEN(unit=42, file=uvel_file,status=
'unknown')
4383 IF(check/=endi)
THEN 4384 stop
'Error during data input - probably wrong Lagrangian/Hermite input file!' 4387 READ(42,*) input_values(i)
4391 ELSE IF(input_type==42)
THEN 4393 IF(input_option==0)
THEN 4395 ELSE IF(input_option==1)
THEN 4396 ENDI=SIZE(INPUT_VALUES)
4397 IF(time_step<=10)
THEN 4398 WRITE(input_file,
'("./input/motion/DISPLACEMENT_00",I0,".dat")') time_step
4399 ELSE IF(time_step<100)
THEN 4400 WRITE(input_file,
'("./input/motion/DISPLACEMENT_0",I0,".dat")') time_step
4401 ELSE IF(time_step<1000)
THEN 4402 WRITE(input_file,
'("./input/motion/DISPLACEMENT_",I0,".dat")') time_step
4404 OPEN(unit=time_step, file=input_file,status=
'unknown')
4405 READ(time_step,*) check
4406 IF(check/=endi)
THEN 4407 stop
'Error during data input - probably wrong Lagrangian/Hermite input file!' 4410 READ(time_step,*) input_values(i)
4413 input_values=input_values/length_scale
4414 WRITE(*,*)
'1! INPUT_VALUES=INPUT_VALUES/LENGTH_SCALE' 4416 ELSE IF(input_option==2)
THEN 4417 ENDI=SIZE(INPUT_VALUES)
4418 IF(time_step<=10)
THEN 4419 WRITE(input_file,
'("./input/motion/DISPLACEMENT_00",I0,".dat")') time_step
4420 ELSE IF(time_step<100)
THEN 4421 WRITE(input_file,
'("./input/motion/DISPLACEMENT_0",I0,".dat")') time_step
4422 ELSE IF(time_step<1000)
THEN 4423 WRITE(input_file,
'("./input/motion/DISPLACEMENT_",I0,".dat")') time_step
4425 OPEN(unit=time_step, file=input_file,status=
'unknown')
4427 READ(time_step,*) input_values(i)
4428 input_values(i) = length_scale * input_values(i)
4431 ELSE IF(input_option==3)
THEN 4432 ENDI=SIZE(INPUT_VALUES)
4433 IF(time_step<=10)
THEN 4434 WRITE(input_file,
'("./input/motion/DISPLACEMENT_00",I0,".dat")') time_step
4435 ELSE IF(time_step<100)
THEN 4436 WRITE(input_file,
'("./input/motion/DISPLACEMENT_0",I0,".dat")') time_step
4437 ELSE IF(time_step<500)
THEN 4438 WRITE(input_file,
'("./input/motion/DISPLACEMENT_",I0,".dat")') time_step
4439 ELSE IF(time_step<1000)
THEN 4440 WRITE(input_file,
'("./input/motion/DISPLACEMENT_",I0,".dat")') 1000-time_step
4442 OPEN(unit=time_step, file=input_file,status=
'unknown')
4444 READ(time_step,*) input_values(i)
4445 input_values(i) = length_scale * input_values(i)
4449 stop
'Error during data input' 4453 999 errorsexits(
"FLUID_MECHANICS_IO_READ_DATA",err,error)
4467 INTEGER(INTG) :: TEMP(200)
4471 OPEN(unit = 1, file=
namz,status=
'old')
4477 WRITE(*,*)
'Reading Elements...' 4493 stop
'Error during allocation' 4522 WRITE(*,
'("M-Elements: ", (I0,3x), (1000(I0, 1x)) )')i, &
4527 WRITE(*,
'("V-Elements: ", (I0,3x), (1000(I0, 1x)) )')i, &
4532 WRITE(*,
'("P-Elements: ", (I0,3x), (1000(I0, 1x)) )')i, &
4564 CHARACTER*90 DARCY_PARAM_FILE
4566 darcy_param_file=
'./input/Darcy_parameters.inp' 4568 WRITE(*,*)
'Reading Darcy parameters.' 4570 OPEN(unit=37,file=darcy_param_file,status=
'old',action=
'read')
4575 IF (index(
in_char,
'TESTCASE:') == 1)
READ(37,*)
darcy%TESTCASE
4578 IF (index(
in_char,
'ANALYTIC:') == 1)
READ(37,*)
darcy%ANALYTIC
4579 IF (index(
in_char,
'DEBUG:') == 1)
READ(37,*)
darcy%DEBUG_MODE
4581 IF (index(
in_char,
'LENGTH:') == 1)
READ(37,*)
darcy%LENGTH
4583 IF (index(
in_char,
'GEOM_TOL:') == 1)
READ(37,*)
darcy%GEOM_TOL
4593 IF (index(
in_char,
'P_SINK:') == 1)
READ(37,*)
darcy%P_SINK
4595 IF (index(
in_char,
'BC_NUMBER_OF_WALL_NODES:') == 1)
READ(37,*)
darcy%BC_NUMBER_OF_WALL_NODES
4596 IF (index(
in_char,
'NUMBER_OF_BCS:') == 1)
READ(37,*)
darcy%NUMBER_OF_BCS
4601 IF(
darcy%DEBUG_MODE )
THEN 4602 write(*,*)
'Read Darcy parameters from the following file = ',darcy_param_file
4603 write(*,*)
'Press ENTER to continue.' 4607 IF( abs(
darcy%VIS) > 1.0e-14 )
THEN 4608 darcy%PERM_OVER_VIS =