CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

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

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes
  • 2 Post By fra76
  • 5 Post By mykkujinu2201
  • 2 Post By mykkujinu2201
  • 1 Post By fra76
  • 1 Post By Rotidpor

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2019, 21:46
Default How to map surface of one case to boundary of other cases?
  #1
Member
 
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 10
mykkujinu2201 is on a distinguished road
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
mykkujinu2201 is offline   Reply With Quote

Old   May 22, 2019, 18:27
Default Applying profile
  #2
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
Quote:
Originally Posted by mykkujinu2201 View Post
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
lpz456 and wht like this.
fra76 is offline   Reply With Quote

Old   May 23, 2019, 02:49
Default
  #3
Member
 
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 10
mykkujinu2201 is on a distinguished road
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

Last edited by mykkujinu2201; May 23, 2019 at 04:14.
mykkujinu2201 is offline   Reply With Quote

Old   May 23, 2019, 04:14
Default
  #4
Member
 
Jun
Join Date: Nov 2015
Posts: 57
Rep Power: 10
mykkujinu2201 is on a distinguished road
Dear Francesco,

I tested for my case which is about 3D problem.
It works pefectly.

Thank you again.

Best regards,
Jun
a.abadani and lpz456 like this.
mykkujinu2201 is offline   Reply With Quote

Old   May 24, 2019, 00:14
Default
  #5
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
Great!

Have fun,
Francesco
lpz456 likes this.
fra76 is offline   Reply With Quote

Old   November 29, 2021, 11:02
Default
  #6
New Member
 
Fab
Join Date: Apr 2019
Posts: 27
Rep Power: 7
Rotidpor is on a distinguished road
I tried the following with the 2106 version.

Quote:
Originally Posted by mykkujinu2201 View Post
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.

Well, I have no clue about what is happening, openFoam complains and says this :


--> FOAM FATAL ERROR: (openfoam-2106)
Only 0 provided.
Need at least three non-colinear points to be able to interpolate.

From Foam::coordSystem::cartesian Foam:ointToPointPlanarInterpolation::calcCoordin ateSystem(const pointField&) const
in file triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C at line 57.

FOAM exiting


Has anyone any idea ? I just want to use a boundaryField that I sampled from another case as a fixedValue BC, it shoudn't be that hard... Meshes are different but topologically, the patch is strictly the same...
Rotidpor is offline   Reply With Quote

Old   March 14, 2023, 11:42
Default
  #7
New Member
 
shiyu
Join Date: Mar 2018
Location: london
Posts: 7
Rep Power: 8
shiyu is on a distinguished road
Hi Rotidpor, I have just encountered the same problem with version 2206. I am wondering if you have fixed this kind of error.
Thanks.


Quote:
Originally Posted by Rotidpor View Post
I tried the following with the 2106 version.




Well, I have no clue about what is happening, openFoam complains and says this :


--> FOAM FATAL ERROR: (openfoam-2106)
Only 0 provided.
Need at least three non-colinear points to be able to interpolate.

From Foam::coordSystem::cartesian Foam:ointToPointPlanarInterpolation::calcCoordin ateSystem(const pointField&) const
in file triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C at line 57.

FOAM exiting


Has anyone any idea ? I just want to use a boundaryField that I sampled from another case as a fixedValue BC, it shoudn't be that hard... Meshes are different but topologically, the patch is strictly the same...
shiyu is offline   Reply With Quote

Old   March 15, 2023, 02:57
Default
  #8
New Member
 
Fab
Join Date: Apr 2019
Posts: 27
Rep Power: 7
Rotidpor is on a distinguished road
Well, it might not be the most elegant way to solve this but anyways...
I solved the issue in my case by using the file faceCenters instead of points. I just follow the procedure written here but I replace "points" by "faceCenters" (also generated by sampleDict) and rename it points.


I don't know what is going on, don't know how it works but it does, at least in my case.
lpz456 likes this.
Rotidpor is offline   Reply With Quote

Reply

Tags
mapfields, sampledict


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
domain imbalance for enrgy equation happy CFX 14 September 6, 2012 01:54
Axysimmetric cases compare to planar case with symmetry boundary condition hafiidz FLUENT 5 June 14, 2011 06:29
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 03:53.