How to create a new mapFields functionObjects?
Hi,
I need to modify mapFields to create a custom mapper as mentioned here: https://www.cfd-online.com/Forums/op...mapfields.html I start off by just making a clone of mapFields, called mapFields_dynamicMesh to make sure that's it's working. I tried to follow the tutorial by Prof Nilsson, just changing the names to work on mapFields: https://www.tfd.chalmers.se/~hani/ku...tionObject.pdf The steps are: cp -r --parents src/functionObjects/field/mapFields $WM_PROJECT_USER_DIR cd $WM_PROJECT_USER_DIR/src/functionObjects/field mv mapFields mapFields_dynamicMesh cd mapFields_dynamicMesh sed -i 's/mapFields/mapFields_dynamicMesh/g' * rename 's/mapFields/mapFields_dynamicMesh/' * Make/files: Code:
mapFields_dynamicMesh/mapFields_dynamicMesh.C Code:
EXE_INC = \ So what should I change to make it work? I think I have to do something like: EXE = $(FOAM_USER_APPBIN)/mapFields_dynamicMesh but I'm not sure how. Can someone help? Thanks! |
Hi there,
I didn't get completely what you want to achieve. And it seems the things you discussed are different from each other. mapFields function object refers to "Maps input fields from local mesh to secondary mesh at runtime." (@https://develop.openfoam.com/Development/openfoam/-/blob/OpenFOAM-v2212/src/functionObjects/field/mapFields/mapFields.H) and mapFields as a standalone application is a preProcessing tool which is described as "Maps volume fields from one mesh to another, reading and interpolating all fields present in the time directory of both cases" (@https://develop.openfoam.com/Development/openfoam/-/blob/OpenFOAM-v2212/applications/utilities/preProcessing/mapFields/mapFields.C). So depending on which one you need for your case you need to modify the corresponding one. If you need the function object one, you should use it like every other function object. Just as an example refer to OpenFOAM-v2212/tutorials/incompressible/pimpleFoam/laminar/cylinder2D. |
All times are GMT -4. The time now is 09:25. |