is there a command to restate after setFields?
I have changed the mesh after setFields command and it now gives an error
.so I like to know if is there a command or way to delete non uniform initial values and set it again after such changes? |
I am not aware of a utility to reset the fields, however you can just open the text files in the 0 directory and delete the internal fields data so that the file only contains the boundary conditions. In general, I think the approach is to create a copy of the field files before running to setFields to avoid having to do it manually.
|
Indeed, as Matthew suggests, make a habit of doing
Code:
cp -r 0 0.orig Putting the files back is then simply done as Code:
cp 0.orig/* 0/ L |
but it would be nice that a tool be provided like in Swak4Foam for this purpose(if there is not any now!)
|
actually the method suggested by Lieven is very simple
so there is no need for a separate tool, however if you have recognized the need for a tool you can exploit the great advantage of OpenFoam: You can do everything yourself. Along with the advantage comes a disadvantage: You have to do everything yourself. Still a simple search and replace function like sed (use google on that one in combination with keywords like command and terminal or type: sed --help to get further advice on how to use it) in a bash script should do the work. Deriving a separate c++ code or anything else from that problem is breaking butterflies on a wheel in my opinion. I hope I could contribute regards |
I think pyFoamClearInternalField.py is what you are looking for.
|
what does mean fieldfile?what should I replace it in the command?
Code:
===== |
according to the error I set a patch(right) and a value(p as a field) but nothing done.
Code:
ehsan@Ehsan-com:~/Desktop/two_parted$ pyFoamClearInternalField.py p |
Greetings to all!
@Ehsan: I have not tried this, but the help text seems very clear to me!
Best regards, Bruno |
the files are compressed.have to decompressed them at first?
Code:
ehsan@Ehsan-com:~/Desktop/two_parted$ pyFoamClearInternalField.py p --value=0.0 |
According to the error message, you should run like this:
Code:
pyFoamClearInternalField.py 0/p --value=0.0 |
I think so.
then should repeat it for all fields one after another.:) |
All times are GMT -4. The time now is 05:22. |