# How to map surface of one case to boundary of other cases?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 21, 2019, 21:46 How to map surface of one case to boundary of other cases? #1 New Member   Jun Join Date: Nov 2015 Posts: 28 Rep Power: 7 Dear all, Currently, I am trying to solve a case which requires fully developed inlet velocity profile. The inlet has square cross section. In addition, the fluid is non-Newtonian so there is no exact solution for the inlet velocity profile. I have two options; putting straight channel longer than entrance length or calculating the straight channel separately and mapping the fully developed velocity profile to inlet of the original case. I know there is "mapFields" utility but that utility maps fields not surface and both cases have overlapped section. What I want is that mapping the cutting plane (not outlet patch) inside the first case to the inlet of the second case. How can I do this? Any advice would be helpful. Thanks. Jun

May 22, 2019, 18:27
Applying profile
#2
Senior Member

Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 234
Rep Power: 15
Quote:
 Originally Posted by mykkujinu2201 Dear all, Currently, I am trying to solve a case which requires fully developed inlet velocity profile. The inlet has square cross section. In addition, the fluid is non-Newtonian so there is no exact solution for the inlet velocity profile. I have two options; putting straight channel longer than entrance length or calculating the straight channel separately and mapping the fully developed velocity profile to inlet of the original case. I know there is "mapFields" utility but that utility maps fields not surface and both cases have overlapped section. What I want is that mapping the cutting plane (not outlet patch) inside the first case to the inlet of the second case. How can I do this? Any advice would be helpful. Thanks. Jun
Hi,

For this problem I normally sample a plane in the source case, using foamCase as output format. Then I take the output of sample, place it in constant/boundaryData and apply it to the inlet of the second case, positioned in the same place as the cutting plane, using timeVaryingMappedFixedValue BC.
I am not sure if the sampled data is ready as it is or the files need some little manipulation, but the general process is what is described above.

Hope this helps,
Francesco

 May 23, 2019, 02:49 #3 New Member   Jun Join Date: Nov 2015 Posts: 28 Rep Power: 7 Dear Francesco, Thank you for the reply. Actually, it seems that you gave me the correct solution. I thought timeVaryngMappedFixedValue BC might be the solution but I doubt whether it is or not. Anyway, I could start to check with your advice though it needs some more as you already said. The sequence is as below. 1. Sample the surface using sampleDict. Export the sampled data in the format "foamFile". 2. Make directory at constant/boundaryData/inlet/0. 3. Among the sampled data, copy "points" to constant/boundaryData/inlet. 4. Among the sampled data, copy field data to constant/boundaryData/inlet/0. in my case, I only need velocity field U so I coppied U from sampled data. 5. Header should be added for "points" and field files. As in pitzDailyExptInlet tutorial, add headers for each files. 6. Set the boundary type to timeVaryingMAppedFixedValue and add "offset (0 0 0); setAverage off;" for vector field or "offset 0; setAverage off;" for scalar field. 7. Run the simulation. I only checked it for simple 2D channel flow. I will apply this to my case and let you know the result. Again, thank you so much. Best regards, Jun wolfindark likes this. Last edited by mykkujinu2201; May 23, 2019 at 04:14.

 May 23, 2019, 04:14 #4 New Member   Jun Join Date: Nov 2015 Posts: 28 Rep Power: 7 Dear Francesco, I tested for my case which is about 3D problem. It works pefectly. Thank you again. Best regards, Jun

 May 24, 2019, 00:14 #5 Senior Member   Francesco Del Citto Join Date: Mar 2009 Location: Zürich Area, Switzerland Posts: 234 Rep Power: 15 Great! Have fun, Francesco

 Tags mapfields, sampledict