Page 3 of 10
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Tue Dec 24, 2013 8:38 am
				by SRIB
				Hello, 
that sounds good. Thank you very much and have a nice christmas.
Regards,
Sebastian
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Fri Jan 03, 2014 3:22 pm
				by Yvan Fournier
				Hello,
I fixed the parallel joining bug (hopefully), and the correct version is now downloadable at : 
http://code-saturne.org/viewvc/saturne/ ... iew=markup. You may add it to your SRC directory for now, and will not need it anymore when 3.2.2 is released.
Also, when joining the mesh in standard (preprocessing, not turbomachinery) mode, an error message indicates some faces are not joined correctly. visualizing the joining, some faces are indeed not joined correctly. I ran a few tests, and to fix this, I needed a "fraction" of 0.2 (instead of 0.1), and I used a "plane" criteria of 20 degrees instead of 25 (but 25 should be OK ; I just tested plane before fraction and did not check all combos).
So whether testing the mesh with joining or using rotation in cs_user_turbomachinery.c, you will need to increase your "fraction" joining parameter from 0.1 to 0.2 (this would not be necessary with a slightly better quality mesh, or at least a mesh).
Finally, the reason why your mesh does not rotate is that your cell_criteria for the rotor is incorrect: your "rotor_wall" group seems to be a group of faces, not cells (judging by the preprocessor logs). You need to edit your rotor mesh so as to define for example a "rotor_cells" group to all cells (not faces) of that mesh, and use "rotor_cells" (not walls) for the cell criteria.
This should definitely help.
Regards,
  Yvan
 
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Fri Jan 03, 2014 10:05 pm
				by SRIB
				Hello Yvan,
thank you very much. At the moment I'm not at the University. Thus, I'm not able to test it. I will be back in the Lab on tuesday. I will give you a feedback as soon as possible.
Regards,
Sebastian
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Wed Jan 08, 2014 7:22 pm
				by SRIB
				Hello Yvan, 
i followed your instructions. I copied your cs_join_util.c into the SRC folder. Do i have to change some things in the subroutine? If not, it does not work yet. I attached the error and listing files. 
Related to the group of cells: in Salome i found a way to create a group of volumes. This should be the same, or? I attached a picture of this group. 
Until now the rotation does not work for my case. I do not know what i do wrong. If i just set the joining in the cs_turbomachinery than nothing will be joined. If i do it in addition in the GUI it works with the joining. 
Regards, 
Sebastian
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Wed Jan 08, 2014 7:58 pm
				by SRIB
				I have another question. It is a maybe a bit strange but in fact I am not sure if my rotor rotates or not 

 You checked my mesh and said that I defined a wrong group (group of faces instead of cells). How did you checked this. Are they any paramters written in the lisitng when the rotation works. Until now I visualized streamlines in Paraview to check rotation. Is there a better way?
Regards, 
Sebastian
 
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Wed Jan 08, 2014 11:29 pm
				by Yvan Fournier
				Hello,
In a previous post, you said you had no rotation, and when I checked your preprocessor.log files, I saw you had no volume groups for the rotor, so your selection criteria had no chance of working (the "listing" file also recaps group info).
With correct rotation, your mesh should be updated with time, so if you simply output visualization data at multiple time steps, you should see the rotor in multiple positions.
Regards,
  Yvan
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Thu Jan 09, 2014 12:54 am
				by SRIB
				Hello, 
this is in fact not the case. So, then i have still no rotation. I did the following:
1. I defined a group of volumes containing all cells of my rotor
2. I copied your created subroutine into the SRC folder without changing anything
3. I set up the GUI (without a definition of face joining, because of the the turbomachinery subroutine). No mesh joining was written in the listing. Adding Face joining in the GUI it was written in the listing.
4. I edit the turbomachinery: 
  /* Set turbomachinery model type:
82	
83	     CS_TURBOMACHINERY_NONE,          No turbomachinery modeling
84	     CS_TURBOMACHINERY_FROZEN,        Frozen rotor model
85	     CS_TURBOMACHINERY_TRANSIENT      Full transient simulation
86	  */
87	
88	  cs_turbomachinery_set_model(CS_TURBOMACHINERY_TRANSIENT);
89	}
90	
91	/*----------------------------------------------------------------------------
92	 * Define rotor axes, associated cells, and rotor/stator faces.
93	 *----------------------------------------------------------------------------*/
94	
95	void
96	cs_user_turbomachinery_rotor(void)
97	{
98	  return; /* REMOVE_LINE_FOR_USE_OF_SUBROUTINE */
99	
100	  /* Define rotor axis and cells, with rotor/stator interface face joining */
101	  /* --------------------------------------------------------------------- */
102	
103	  if (true) {
104	
105	    /* Define cells belonging to rotor and associated axis */
106	
107	    double rotation_velocity = 2500; for 2500 RPM
108	    double rotation_axis[3] = {0., 0., 19.5}; lenght of the z-axis
109	
110	    const char cell_criteria[]  = "cell_group";
113	
114	    cs_turbomachinery_add_rotor(cell_criteria,
115	                                rotation_velocity,
116	                                rotation_axis);
117	
118	    /* Define joining associated with rotor/stator interface */
119	
120	    const char faces_criteria[] = "coupled_boundary";
121	
122	    int    verbosity = 1;     /* per-task dump if > 1, debug level if >= 3 */
123	    int    visualization = 1; /* debug level if >= 3 */
124	    float  fraction = 0.20, plane = 20.;
125	
126	    int join_num = cs_turbomachinery_join_add(faces_criteria,
127	                                              fraction,
128	                                              plane,
129	                                              verbosity,
130	                                              visualization);
131	
132	    /* Note that advanced parameters may be defined
133	       using cs_join_set_advanced_param(),
134	       just as for regular joinings or periodicities. */
135	  }
136	}
137	
138	/*----------------------------------------------------------------------------*/
139	
140	END_C_DECLS
Do you habe an idea what i do wrong? 
Regards, 
Sebastian
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Thu Jan 09, 2014 1:20 pm
				by Yvan Fournier
				Hello,
Yes, in your cs_user_turbomachinery_rotor() subroutine, you seem to have forgotten to remove the "return" statement at the beginning (did you use the file from SRC/REFERENCE in a case, or copy it from the distribution sources src/user directory ?). Also remove it from cs_ser_turbomachinery (otherwise the mode will not be activated at all).
For rotation, DO NOT add the "coupled_boundary" joining in the GUI. Add it in in cs_turbomachinery_rotor only. If it does not appear, it means the function is not called, or returns too early.
Regards,
  Yvan
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Thu Jan 09, 2014 2:17 pm
				by SRIB
				Hello, 
I copied cs_turbomachinery from SRC/Reference. In the Subroutine I used there is not such a line. In my last post i copied just the example. Good to know that i should not add it in the GUI. 
One important question related to rotational velocity and rotation axis in the subroutine. Is it correct to enter the value for rotation in rounds per minute or should it be in Rad/s? And do I have to set it as e.g. -2500 to get an anti-clockwise rotation? And for rotation axis i entered the lenght of the z-axis. In my case 19.5 mm. Correct or not?
Thank you. Regards, 
Sebastian
			 
			
					
				Re: Computation of a Simplified Centrifugal Blood Pump
				Posted: Thu Jan 09, 2014 3:13 pm
				by Yvan Fournier
				Hello,
The rotation velocity seems to be in rad/s, and the values you provide for the axis are renormalized, so they make no difference as long as they are in the right direction.
To rotate counterclockwise, yes, you can simply use a negative sign for the rotation velocity.
Regards,
  Yvan