CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

initialize from data file

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By `e`

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 19, 2018, 12:57
Default initialize from data file
  #1
Senior Member
 
Join Date: Nov 2011
Posts: 109
Rep Power: 15
robboflea is on a distinguished road
Hi all,

I am working on some complicated boundary condition manipulation using UDFs and I do need a way to enforce the wall boundary conditions without initializing the solution.

To clarify, here's the workflow I am following.
1) read the case and data
2) assign wall temperature profiles from some data files

at this point I need to execute a UDF that takes those wall temperatures and stores them. The problem is that these values coming from the assigned temperature profiles, are not actually enforced on the solution unless I either start the solution itself or I initialize the solution using one of the methods (hybrid, fmg...). The issue is that I do not want to initialize the solution as it will then probably take longer to converge and I'd prefer not. I cannot either start the calculation as the CFD involves moving meshes and if I start it it's going to to to the first time-step, deforming the grid and this will not work (for reasons that deal with what this UDF is supposed to do, I won't bother you with this).

The question is: is there a way to, let's say, enforce the wall boundary conditions without initializing the solution? Or maybe initialize the solution explicitly from a data file? Bear in mind that reading the data file does not suffice as this does not enforce the wall boundary conditions as an initialization would!

Thanks a lot!

Rob
robboflea is offline   Reply With Quote

Old   June 20, 2018, 03:37
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
You could populate the boundary face values with a DEFINE_INIT or DEFINE_ON_DEMAND macro, by looping over the faces within your boundary zone. Alternatively, disable the dynamic mesh for the first time step (note: the dynamic mesh is called at the beginning of each time step).

Quote:
Originally Posted by robboflea View Post
I cannot either start the calculation as the CFD involves moving meshes and if I start it it's going to to to the first time-step, deforming the grid and this will not work (for reasons that deal with what this UDF is supposed to do, I won't bother you with this).
We are intrigued, please elaborate.
robboflea likes this.
`e` is offline   Reply With Quote

Old   June 20, 2018, 08:23
Default
  #3
Senior Member
 
Join Date: Nov 2011
Posts: 109
Rep Power: 15
robboflea is on a distinguished road
Quote:
Originally Posted by `e` View Post
You could populate the boundary face values with a DEFINE_INIT or DEFINE_ON_DEMAND macro, by looping over the faces within your boundary zone. Alternatively, disable the dynamic mesh for the first time step (note: the dynamic mesh is called at the beginning of each time step).



We are intrigued, please elaborate.
Unfortunately I can only use profile files as the wall temperature I am trying to model varies from point to point in a way I cannot model through an analytical function. It then becomes a nightmare to assign values using a UDF. I think resorting to disabling the dynamic mesh is the only way I can do this. Seems a plausible way out.

The issue is that if I assign a temperature profile on a rotating wall, Fluent does not rotate the profile together with the mesh. I am writing a UDF that does so. The workflow reads like:
1) assign wall temperature on non-rotated wall using .prof file
2) call a UDF that stores for each boundary node its wall temperature
3) start the unsteady calculation so for each time-step we now have:
- rotate the mesh
- call a define profile UDF that assigns the wall temperature to the wall not based on the position but on the node ID

I was struggling on point 1). I think now it should be working based on your suggestion.
robboflea is offline   Reply With Quote

Old   June 20, 2018, 08:58
Default
  #4
Senior Member
 
Join Date: Nov 2011
Posts: 109
Rep Power: 15
robboflea is on a distinguished road
by the way: do you know how to disable mesh rotation from TUI? struggling to find it...
robboflea is offline   Reply With Quote

Old   June 20, 2018, 10:41
Default
  #5
Senior Member
 
Join Date: Nov 2011
Posts: 109
Rep Power: 15
robboflea is on a distinguished road
just in case anyone else needs it, the command is: p, li { white-space: pre-wrap; }

/define/boundary-conditions/modify-zones/copy-mesh-to-mrf-motion
robboflea is offline   Reply With Quote

Reply


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
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 18:25
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 20:43
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


All times are GMT -4. The time now is 16:36.