CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Changing the grid on the same set-up (https://www.cfd-online.com/Forums/fluent/43582-changing-grid-same-set-up.html)

Katya February 1, 2007 08:24

Changing the grid on the same set-up
 
Could anybody advise how to change the grid but safe the rest of setup? Thanks.

Gernot February 2, 2007 02:31

Re: Changing the grid on the same set-up
 
Hello Katya, in fluent you can write out the boundary conditions with the help of the text user interface (tui). You type :

file write-bc nameofbc

If you have a fluent file with different mesh or even different geometrie but the same names for the boundarys you write :

file read-bc nameofbc

After that all boundarys with the same name should have the same condition.

hope that helps.

P.S. hey kd whats up with you bad day ore just no education !?

gurion February 2, 2007 05:43

Re: Changing the grid on the same set-up
 
Hi Gernot

Are you sure about different geometry? If I'm not mistaken I saw on this board a statement to the contrary.

I have a question regarding the boundary conditions file, does it work with species transport and volumetric reactions as well?

Allan Walsh February 2, 2007 14:16

Re: Changing the grid on the same set-up
 
Yes, read/write-bc works with species transport and reactions.

The other feature that can be useful is the interpolation read/write. Say, for example, if the inlet boundaries are changed but the rest of domain is unchanged, the variables can be written to an interpolation file and then the file read back into the new mesh. This would not work that well if the geometry of the domain was completely changed.

Toulouser February 3, 2007 00:46

Re: Changing the grid... ( Hope this helps !!!!!)
 
================================================ Duplicating the Case Setup for Different Mesh =================================================

On many occasions, it is necessary to replace the grid while retaining all of the settings for the case. It can be tiresome to start by reading a new mesh file and then duplicating the case setup by specifying settings through the GUI . In addition, there is always a chance for making an error when specifying the new case file setup. FLUENT offers two methods that can be used to simplify this process. It is also possible to use the earlier converged solution as an initial guess for the new CFD run. Procedure Starting with the old Gambit database, or otherwise, generate a new mesh with the necessary modifications. Make sure that the names of the boundaries are identical with those in the existing FLUENT case. Method-1 1. Start FLUENT and read the old case file which will be duplicated. 2. Type the following scheme command in the FLUENT console window:
: (reread-grid "newmeshfilename") In place of newmeshfilename, enter the name of the .msh file to be used. For example, (reread-grid "fine.msh") Note: Do not miss the opening and closing parentheses, or the quotation marks before and after the name of the mesh file. It is also possible to read the mesh file in .gz form. 3. Save the case file and exit the FLUENT session. Method-2 1. Start FLUENT and read the case file which will be duplicated. Write a file called BC that contains all of the case setup information. This can be achieved by entering the following text user interface (TUI) command: file/write-bc/bcfilename In place of bcfilename, enter the name of the file to be written. For example, file/writebc/ setup.bc. For detailed information about TUI commands, please refer to TUI commands. 2. Start FLUENT again, read in the new mesh file, and enter the following command to read in the BC file: file/read-bc/bcfilename 3. Save the case file and exit the FLUENT session. Now, the case file with the new mesh is ready for iteration. 4. Start FLUENT and read the recently saved case file. 5. To initialize the case, or interpolate the results from an earlier simulation, do the following: (a) Read the earlier case and data file. (b) Write out an interpolation file using the FileÆ Interpolate menu. (c) Read the new case and interpolate the earlier results using the Read option in the File Æ Interpolate menu. The user has the freedom to select cell zones as well as the variables of interest while writing the interpolation file. For details about the interpolation process, please refer to: Interpolation steps Tips/Troubleshooting • The BC files can be version specific. Hence, it is highly recommended to use BC files only within a single version of FLUENT. For example, a BC file written with an older FLUENT version (say FLUENT 6.0.20) may not work with a newer version (FLUENT 6.2.16). • If the boundary zones do not have the exact same names as in the BC file, they may be ignored and set to default values during the case setup. In such a circumstance, manual settings will be required. • The name BC file is somewhat misleading. BC files record the entire case setup. In addition to the boundary condition settings, a BC file also contains information about solver settings, values for under relaxation factors, definitions of custom field functions, settings for the monitors to be applied, etc. • The grid will not be scaled by using any of the steps mentioned here. Hence, check grid scaling after using this prescribed approach for case setup. • Interpolating the results from an earlier case and data file may not always help with convergence. If the earlier results were not fully converged, or if they are highly unphysical, it is recommended to initialize the new case using standard procedures.


gurion February 3, 2007 09:31

Re: Changing the grid... ( Hope this helps !!!!!)
 
(reread-grid "newmeshfilename")? Where is the documentation on this? Anyway, I tried it and it looks like it is working, saved me manually re-typing 40 reactions with 19 species. Thank you for this most useful tip.

While on the subject of chemical species, do you know of a shortcut to export mixture reactions and species data from a case file to a propdb.scm file?

zxaar February 3, 2007 19:20

Re: Changing the grid... ( Hope this helps !!!!!)
 
I think you should put this in Wiki FAQs.

teymourj October 8, 2009 16:31

Thank you!
 
Hi,

Just wanted to thank you for this detail reply. That helped me to initialize my new mesh with old data perfectly. :)

Thank you so much again and again!

_teymourj

Quote:

Originally Posted by Toulouser
;138829
================================================ Duplicating the Case Setup for Different Mesh =================================================

On many occasions, it is necessary to replace the grid while retaining all of the settings for the case. It can be tiresome to start by reading a new mesh file and then duplicating the case setup by specifying settings through the GUI . In addition, there is always a chance for making an error when specifying the new case file setup. FLUENT offers two methods that can be used to simplify this process. It is also possible to use the earlier converged solution as an initial guess for the new CFD run. Procedure Starting with the old Gambit database, or otherwise, generate a new mesh with the necessary modifications. Make sure that the names of the boundaries are identical with those in the existing FLUENT case. Method-1 1. Start FLUENT and read the old case file which will be duplicated. 2. Type the following scheme command in the FLUENT console window:
: (reread-grid "newmeshfilename") In place of newmeshfilename, enter the name of the .msh file to be used. For example, (reread-grid "fine.msh") Note: Do not miss the opening and closing parentheses, or the quotation marks before and after the name of the mesh file. It is also possible to read the mesh file in .gz form. 3. Save the case file and exit the FLUENT session. Method-2 1. Start FLUENT and read the case file which will be duplicated. Write a file called BC that contains all of the case setup information. This can be achieved by entering the following text user interface (TUI) command: file/write-bc/bcfilename In place of bcfilename, enter the name of the file to be written. For example, file/writebc/ setup.bc. For detailed information about TUI commands, please refer to TUI commands. 2. Start FLUENT again, read in the new mesh file, and enter the following command to read in the BC file: file/read-bc/bcfilename 3. Save the case file and exit the FLUENT session. Now, the case file with the new mesh is ready for iteration. 4. Start FLUENT and read the recently saved case file. 5. To initialize the case, or interpolate the results from an earlier simulation, do the following: (a) Read the earlier case and data file. (b) Write out an interpolation file using the FileÆ Interpolate menu. (c) Read the new case and interpolate the earlier results using the Read option in the File Æ Interpolate menu. The user has the freedom to select cell zones as well as the variables of interest while writing the interpolation file. For details about the interpolation process, please refer to: Interpolation steps Tips/Troubleshooting • The BC files can be version specific. Hence, it is highly recommended to use BC files only within a single version of FLUENT. For example, a BC file written with an older FLUENT version (say FLUENT 6.0.20) may not work with a newer version (FLUENT 6.2.16). • If the boundary zones do not have the exact same names as in the BC file, they may be ignored and set to default values during the case setup. In such a circumstance, manual settings will be required. • The name BC file is somewhat misleading. BC files record the entire case setup. In addition to the boundary condition settings, a BC file also contains information about solver settings, values for under relaxation factors, definitions of custom field functions, settings for the monitors to be applied, etc. • The grid will not be scaled by using any of the steps mentioned here. Hence, check grid scaling after using this prescribed approach for case setup. • Interpolating the results from an earlier case and data file may not always help with convergence. If the earlier results were not fully converged, or if they are highly unphysical, it is recommended to initialize the new case using standard procedures.



All times are GMT -4. The time now is 21:04.