CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Mapping fields (https://www.cfd-online.com/Forums/openfoam-pre-processing/62269-mapping-fields.html)

hsieh September 14, 2005 16:07

Hi, For two cases with iden
 
Hi,

For two cases with identical geometry, is it possible to map only certain data, say gamma field from source to target and set U and P zero in target? The following is the reason:

If I finish solving one case, and I would like to use the same gamma field for a second run with different starting inlet velocity.

It will be appreciated if you can point a direction to me.

pei

duderino September 14, 2005 16:59

I don't if you can specify the
 
I don't if you can specify the data you want to map.
But you can do first the mapping of gamma and than reedit or overwrite your P and U. This is maybe not the most elegant solution, but it will do the job.

jens

hsieh September 14, 2005 17:17

Hi, Jens, Could you explain
 
Hi, Jens,

Could you explain your approach? If I do mapping, then all fields (gamma, U, and p) will be mapped to the target case at the same time step. How do I re-edit p and U to zero? (Now that I think about it, I can write a small C code to read U and p in, set everything to 0 and then write them out.)

pei

hsieh September 14, 2005 19:56

Hi, Jens, After more though
 
Hi, Jens,

After more thought, I think your idea is pretty good. What I ended up doing is:

1. initialzied the new case to zero for p/U/gamma.
2. copy gamm from source case to the target case at time 0 (this will replace the original gamma file).
3. added BCs at the end of the gamma file.

In this case, I did not even have to do any mapping.

pei


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