CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   interpolate with batch file (https://www.cfd-online.com/Forums/cfx/24153-interpolate-batch-file.html)

Claudia June 19, 2007 16:46

interpolate with batch file
 
Hi,

I would like to interpolate the values from a file name test.res on the mesh from the file named solve.def. I would like to use the command line. In the manual there is something written like -interpolate-iv But when I write:

cfx5solve -def solve.def -interpolate-iv test.res ...and so on, it doesn't work. So, what's wrong?

Thanks

Claudia

Glenn Horrocks June 19, 2007 18:08

Re: interpolate with batch file
 
Hi,

Try cfx5interp.

Glenn Horrocks

Claudia June 20, 2007 03:30

Re: interpolate with batch file
 
Hi Glenn,

this is what i don't want, because I would like to interpolate and start the job in one step, because I am a user of a cluster and I wait a long time to start one job. So I had wo wait for the interpolation and again for the solver run. So can you tell me how the -interpolate-iv command works?

thanks

michel June 20, 2007 05:25

Re: interpolate with batch file
 
Hi Claudia,

The following works for me:

cfx5solve -batch -def solve.def -ini test.res

And edit your .def file to include: EXECUTION CONTROL: RUN DEFINITION:

Interpolate Initial Values = yes END END

You can add this manually to your .def file, or use the -ccl argument.

Regards, Michel

Claudia June 20, 2007 05:38

Re: interpolate with batch file
 
Hi Michael,

thanks for the answer, but the -ini switch only works if you have an equal mesh. I need the -interpolate command, because I have different meshs.

Or is this command from you: ... Interpolate Initial Values = yes END END ...

for interpolating on a different mesh?

Thanks Claudia


Johnson June 20, 2007 06:52

Re: interpolate with batch file
 
Hi,

when you say 'it doesn't work' do you mean that it fails, or that the job proceeds but the interpolation doesn't happen?

I think the syntax of the command you need should be

cfx5solve -def <def> -ini <res> -interp-iv ...

Is this what you are specifying?

Regards,

Johnson

Johnson June 20, 2007 06:54

Re: interpolate with batch file
 
sorry that should be

cfx5solve -def file.def -ini file.res -interp-iv ...

michel June 20, 2007 07:24

Re: interpolate with batch file
 
Sorry, the formatting got a bit screwed up before.

Indeed, "-ini test.res" only specifies that the flow solution from test.res should be used as initial guess. And for some reason CFX then also takes the mesh from test.res, not the one specified in the .def file. By adding the following CCL commands: EXECUTION CONTROL: RUN DEFINITION:

Interpolate Initial Values = yes END END

the flow solution from test.res will be interpolated onto the mesh in solve.def. Perhaps the argument -interp-iv should work, but I don't find it in the solver documentation.

Michel


michel June 20, 2007 07:34

Re: interpolate with batch file
 
Another go at decent formatting:

EXECUTION CONTROL:

RUN DEFINITION:

Interpolate Initial Values = yes

END

END


Claudia June 20, 2007 09:05

Re: interpolate with batch file
 
Dear Johnson and Michel,

thanks for the help. The command:

cfx5solve -def file.def -ini file.res -interp-iv ...

works! My problem was, that the -ini file.res was missing. I only used -interp-iv file.res that was wrong. I will test the modification in .ccl at another time, but I think that it is also a good way.

Thanks for all! Claudia

Stu June 20, 2007 23:32

Different meshes?
 
Just a clarification, you mentioned different meshes. Are they substantially different, or is one simply a scaled version of the other. The reason i am asking is that I thought you could not change the mesh that much, eg the number of boundary conditions, the connection of the nodes to form elements etc.

Is it possible to do the following. I have a small rectangular tank, and I run a multiphase sim that fills the tank with water to 50% full. I then increase the height of the tank by 20% and remesh it. Can I interpolate the previous transient results onto the new mesh as the inital values, ie the new height part of the tank would contain only air, not water. ps I dont not care about what the air is doing, only the flowing of the water.

Thanks Stu


Johnson June 21, 2007 04:57

Re: Different meshes?
 
Stu,

the interpolation should be successful - the overlap will contain the correctly interpolated solution from the previous results file, and the 'new' part should have an approximate solution based on near/surrounding nodes.

However, you should probably check the interpolated solution before embarking on the new transient analysis.

Johnson

stu June 21, 2007 06:17

Re: Different meshes?
 
Thanks for your response.

Where in the documentation does it mention

cfx5solve -def file.def -ini file.res -interp-iv ... ,

specifically the -interp-iv part. I have gone through the solver manual and connot see it in there.

Question how do I check the interpolated results, do I just run the sim for 1 more time step and then examine the results?

Thanks Stu


KB June 21, 2007 08:30

Re: Different meshes?
 
You'll find this option in the command line documentation, i.e. try

cfx5solve -h



All times are GMT -4. The time now is 10:49.